語言

LocalizablePropertyCategoryAttribute(Type, String) 建構函式

定義

使用指定的類型與屬性名稱初始化該 LocalizablePropertyCategoryAttribute 類別的新實例。

public:
 LocalizablePropertyCategoryAttribute(Type ^ type, System::String ^ propertyName);
public LocalizablePropertyCategoryAttribute(Type type, string propertyName);
new Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyCategoryAttribute : Type * string -> Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyCategoryAttribute
Public Sub New (type As Type, propertyName As String)

參數

type
Type

包含 所 propertyName參考屬性的類型名稱。

propertyName
String

該屬性 type 名稱會回傳局部屬性類別。

範例

以下程式碼範例展示了實作此屬性的類別。

public class MyTask : Task  
{  
[LocalizablePropertyCategory (typeof(LocalizedStrings),"MyGeneralCategory")]  
     public string MyProperty  
{ get; set; }  
}  
internal class LocalizedStrings  
    {  
        public static string MyGeneralCategory  
        {  
            get  
            {  
                // Return the localized string.  
            }  
        }  
    }  

備註

該性質必須是靜態的,並回傳一個 String。

適用於