在C#中使用'final'修饰符 [英] using 'final' modifier in C#
问题描述
public 类 A
{
私人 无效 show ()
{
最终 字符串 s = "检查" ;
}
}有人会在上面的代码中使用'final'修饰符吗?
在浏览Q / A博客时找到了这个,它说我们可以在类的方法中声明一个局部变量
是最终的。用户没有解释它的内容尽管如此。
任何帮助都将不胜感激!提前致谢。
您需要在更合适的论坛中提出您的问题。 这个仅针对论坛重新设计问题:
http://social.msdn.microsoft.com/Forums/vstudio/en-US/home ?论坛= csharpgeneral
public class A { private void show() { final String s="checking"; } }
Will someone throw some light on the use of ‘final’ modifier in the above piece of code?
Found this while navigating through Q/A blog, where it said that we can declare a local variable
inside a method of a class to be final. The user did not explain much about its use though.
Any help will be much appreciated! Thanks in advance.
You need to ask your question in a more appropriate forum. This one is for Forum Redesign Issues only:
http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=csharpgeneral
这篇关于在C#中使用'final'修饰符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!