什么是等价的

编程入门 行业动态 更新时间:2024-10-25 14:27:18
本文介绍了什么是等价的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

嘿所有, vb对变量有一个静态关键字,请问charp的等价物是什么? 静态tempVar为String 谢谢, rodchar

解决方案

rodchar写道: hey all, vb有变量的静态关键字,请问charp的等价物是什么? static tempVar as String

也是静态的C# 如下: 静态字符串tempVar; Arne

static是一个C#关键字, 在VB中分享 Ciaran O'Donnell " rodchar"写道:

嘿所有, vb有一个变量的静态关键字,什么是charp的等价物,好吗? 静态tempVar为String 谢谢, rodchar

经典VB静态关键字和C#静态(和VB.NET共享) 修饰符不是一回事。在经典VB中,静态是指静态。用于保留函数内部变量值的。 VB.NET和C#中的共享和静态分别表示应用于 变量,该对象的所有实例共享同一条数据。 Peter - 联合创始人,Eggheadcafe开发者门户网站: http://www.eggheadcafe UnBlog: http:// petesbloggerama.blogspot " rodchar"写道:

嘿所有, vb有一个变量的静态关键字,什么是charp的等价物,好吗? 静态tempVar为String 谢谢, rodchar

hey all, vb has a static keyword for variables, what is charp''s equivalent,please? static tempVar as String thanks, rodchar

解决方案

rodchar wrote:

hey all, vb has a static keyword for variables, what is charp''s equivalent,please? static tempVar as String

also static in C# as in: static string tempVar; Arne

static is a C# keyword, Its Shared in VB Ciaran O''Donnell "rodchar" wrote:

hey all, vb has a static keyword for variables, what is charp''s equivalent,please? static tempVar as String thanks, rodchar

The classic VB "static" keyword and the C# static (and VB.NET "Shared") modifiers are not the same thing. In classic VB, "static" was used to retain the value of a variable inside a function. Shared and Static in VB.NET and C# respectively mean, when applied to a variable, that all instances of the object share the same piece of data. Peter -- Co-founder, Eggheadcafe developer portal: www.eggheadcafe UnBlog: petesbloggerama.blogspot "rodchar" wrote:

hey all, vb has a static keyword for variables, what is charp''s equivalent,please? static tempVar as String thanks, rodchar

更多推荐

什么是等价的

本文发布于:2023-10-27 03:36:03,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1532198.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!