在C#中设置属性 [英] Properties get set in c#
本文介绍了在C#中设置属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
举一个在c#中创建Properties get set函数的示例.
Give an example for create the Properties get set function in c#.
推荐答案
下面的代码将为您提供帮助.
Bellow Code will help you.
private string _Version;
public string Version
{
get { return _Version; }
set { _Version = value; }
}
我相信您正在寻找:
如何使用set/get ?? [ C#:公共方法{get {} set {}} [ http://www.dotnetperls.com/property [
I believe you are looking for this:
How to use set/get ??[^]
C#: public method{get{} set{}}[^]
Read this:
http://www.dotnetperls.com/property[^]
请参阅以下链接:
快速C# [ http://www.daniweb.com/software-development/csharp/threads/178759 [ ^ ]
Refer these links:
Quick C#[^]
http://www.daniweb.com/software-development/csharp/threads/178759[^]
这篇关于在C#中设置属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文