LocalizablePropertyCategoryAttribute(Type, String) 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
使用指定的類型和屬性名稱,初始化 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 。