本文介绍了2关于属性属性的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi, I have two questions:
1. How can I have A Text Property Like TextBox ...
2. How can I Make Browse For File or Directory Property ...





推荐答案

Private TargetValue As String
<Editor(GetType(System.Windows.Forms.Design.FolderNameEditor), GetType(System.Drawing.Design.UITypeEditor))> _
    Public Property Target() As String
    Get
        Return TargetValue
    End Get
    Set(ByVal value As String)

        TargetValue = value
    End Set
End Property

Private TagValue As String
<Editor(GetType(System.ComponentModel.Design.MultilineStringEditor), GetType(System.Drawing.Design.UITypeEditor))> _
Public Property Tag() As String
    Get
        Return TagValue
    End Get
    Set(ByVal value As String)
        TagValue = value
    End Set
End Property



[/ VB]


[/VB]


  1. 什么你的意思是喜欢吗? TextBox 与否?无论如何,只有几个例子:

  1. What do you mean "like"? TextBox or not? Anyway, just a few examples:
class MyType {
    internal TextBox FirstTextBox { get; set; }
    public TextBox SecondTextBox { get; private set; }
    public TextBox ThirdTextBox {
       get { return thirdTextBox; }
    }
    // and so on...
    TextBox thirdTextBox = new TextBox();
    // ...
}

  • 您需要查看任何类似的方法。请参阅:

    [],

    [],

    [],

    [] 。
  • You need to look any many pretty similar methods. Please see:
    http://msdn.microsoft.com/en-us/library/system.io.directory.getdirectories.aspx[^],
    http://msdn.microsoft.com/en-us/library/system.io.directory.getfiles.aspx[^],
    http://msdn.microsoft.com/en-us/library/system.io.directoryinfo.getdirectories.aspx[^],
    http://msdn.microsoft.com/en-us/library/system.io.directoryinfo.getfiles.aspx[^].




  • 祝你好运,

    -SA



    这篇关于2关于属性属性的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

    08-22 17:22