ResXDataNode 建構函式

定義

初始化 ResXDataNode 類別的新執行個體。Initializes a new instance of the ResXDataNode class.

多載

ResXDataNode(String, Object)

初始化 ResXDataNode 類別的新執行個體。Initializes a new instance of the ResXDataNode class.

ResXDataNode(String, ResXFileRef)

使用資源檔的參考,初始化 ResXDataNode 類別的新執行個體。Initializes a new instance of the ResXDataNode class with a reference to a resource file.

ResXDataNode(String, Object, Func<Type,String>)

初始化 ResXDataNode 類別的新執行個體。Initializes a new instance of the ResXDataNode class.

ResXDataNode(String, ResXFileRef, Func<Type,String>)

使用資源檔的參考,初始化 ResXDataNode 類別的新執行個體。Initializes a new instance of the ResXDataNode class with a reference to a resource file.

ResXDataNode(String, Object)

初始化 ResXDataNode 類別的新執行個體。Initializes a new instance of the ResXDataNode class.

public:
 ResXDataNode(System::String ^ name, System::Object ^ value);
public ResXDataNode (string name, object value);
new System.Resources.ResXDataNode : string * obj -> System.Resources.ResXDataNode
Public Sub New (name As String, value As Object)

參數

name
String

資源名稱。The name of the resource.

value
Object

要儲存的資源。The resource to store.

例外狀況

value 中的具名資源不支援序列化。The resource named in value does not support serialization.

namenullname is null.

name 是一個長度為零的字串。name is a string of zero length.

適用於

ResXDataNode(String, ResXFileRef)

使用資源檔的參考,初始化 ResXDataNode 類別的新執行個體。Initializes a new instance of the ResXDataNode class with a reference to a resource file.

public:
 ResXDataNode(System::String ^ name, System::Resources::ResXFileRef ^ fileRef);
public ResXDataNode (string name, System.Resources.ResXFileRef fileRef);
new System.Resources.ResXDataNode : string * System.Resources.ResXFileRef -> System.Resources.ResXDataNode
Public Sub New (name As String, fileRef As ResXFileRef)

參數

name
String

資源名稱。The name of the resource.

fileRef
ResXFileRef

要做為資源的檔案參考。The file reference to use as the resource.

例外狀況

namenull,或 fileRefnullname is null or fileRef is null.

name 是一個長度為零的字串。name is a string of zero length.

適用於

ResXDataNode(String, Object, Func<Type,String>)

初始化 ResXDataNode 類別的新執行個體。Initializes a new instance of the ResXDataNode class.

public:
 ResXDataNode(System::String ^ name, System::Object ^ value, Func<Type ^, System::String ^> ^ typeNameConverter);
public ResXDataNode (string name, object value, Func<Type,string> typeNameConverter);
new System.Resources.ResXDataNode : string * obj * Func<Type, string> -> System.Resources.ResXDataNode
Public Sub New (name As String, value As Object, typeNameConverter As Func(Of Type, String))

參數

name
String

資源名稱。The name of the resource.

value
Object

要儲存的資源。The resource to store.

typeNameConverter
Func<Type,String>

方法的參考,這個方法會接受 Type 並傳回包含 Type 名稱的字串。A reference to a method that takes a Type and returns a string containing the Type name.

例外狀況

value 中的具名資源不支援序列化。The resource named in value does not support serialization.

namenullname is null.

name 是一個長度為零的字串。name is a string of zero length.

適用於

ResXDataNode(String, ResXFileRef, Func<Type,String>)

使用資源檔的參考,初始化 ResXDataNode 類別的新執行個體。Initializes a new instance of the ResXDataNode class with a reference to a resource file.

public:
 ResXDataNode(System::String ^ name, System::Resources::ResXFileRef ^ fileRef, Func<Type ^, System::String ^> ^ typeNameConverter);
public ResXDataNode (string name, System.Resources.ResXFileRef fileRef, Func<Type,string> typeNameConverter);
new System.Resources.ResXDataNode : string * System.Resources.ResXFileRef * Func<Type, string> -> System.Resources.ResXDataNode
Public Sub New (name As String, fileRef As ResXFileRef, typeNameConverter As Func(Of Type, String))

參數

name
String

資源名稱。The name of the resource.

fileRef
ResXFileRef

要做為資源的檔案參考。The file reference to use as the resource.

typeNameConverter
Func<Type,String>

方法的參考,這個方法會接受 Type 並傳回包含 Type 名稱的字串。A reference to a method that takes a Type and returns a string containing the Type name.

例外狀況

namenull,或 fileRefnullname is null or fileRef is null.

name 是一個長度為零的字串。name is a string of zero length.

適用於