VB.Net键盘自动生成属性的快捷方式

时间:2010-09-17 15:57:18

标签: vb.net keyboard-shortcuts

正如标题所示,我正在寻找在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

2 个答案:

答案 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自动生成。

谢谢,