把每个词都大写

时间:2015-02-13 11:02:26

标签: vb.net

我希望将该属性的值大写。看看

Public WriteOnly Property setName() As String
    Set(ByVal value As String)
        name = value
    End Set
End Property

1 个答案:

答案 0 :(得分:2)

您可以将StrConv与ProperCase参数一起使用。

Public WriteOnly Property setName() As String
    Set(ByVal value As String)
        Name = StrConv(value, VbStrConv.ProperCase)
    End Set
End Property