正如标题所示,我正在寻找在vb.net类中生成标准Property语法的键序列。下面的例子,所以对我要求的东西没有混淆。提前谢谢!
Public Property MyProperty() As String
Get
Return _MyProperty
End Get
Set(ByVal value As String)
Me._MyProperty= value
End Set
End Property
答案 0 :(得分:17)
输入“property”并点击两次标签:
Private newPropertyValue As String
Public Property NewProperty() As String
Get
Return newPropertyValue
End Get
Set(ByVal value As String)
newPropertyValue = value
End Set
End Property
答案 1 :(得分:0)
要在Microsoft Visual Studio中生成属性,只需编写prop并按Tab键两次。属性将由Visual Studio自动生成。
谢谢,