Läs på engelska Redigera

Dela via


ResXDataNode Constructors

Definition

Initializes a new instance of the ResXDataNode class.

Overloads

ResXDataNode(String, Object)

Initializes a new instance of the ResXDataNode class.

ResXDataNode(String, ResXFileRef)

Initializes a new instance of the ResXDataNode class with a reference to a resource file.

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

Initializes a new instance of the ResXDataNode class.

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

Initializes a new instance of the ResXDataNode class with a reference to a resource file.

ResXDataNode(String, Object)

Source:
ResXDataNode.cs
Source:
ResXDataNode.cs
Source:
ResXDataNode.cs

Initializes a new instance of the ResXDataNode class.

C#
public ResXDataNode(string name, object value);
C#
public ResXDataNode(string name, object? value);

Parameters

name
String

The name of the resource.

value
Object

The resource to store.

Exceptions

The resource named in value does not support serialization.

name is null.

name is a string of zero length.

Applies to

.NET Framework 4.8.1 och andra versioner
Produkt Versioner
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

ResXDataNode(String, ResXFileRef)

Source:
ResXDataNode.cs
Source:
ResXDataNode.cs
Source:
ResXDataNode.cs

Initializes a new instance of the ResXDataNode class with a reference to a resource file.

C#
public ResXDataNode(string name, System.Resources.ResXFileRef fileRef);

Parameters

name
String

The name of the resource.

fileRef
ResXFileRef

The file reference to use as the resource.

Exceptions

name is null or fileRef is null.

name is a string of zero length.

Applies to

.NET Framework 4.8.1 och andra versioner
Produkt Versioner
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

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

Source:
ResXDataNode.cs
Source:
ResXDataNode.cs
Source:
ResXDataNode.cs

Initializes a new instance of the ResXDataNode class.

C#
public ResXDataNode(string name, object value, Func<Type,string> typeNameConverter);
C#
public ResXDataNode(string name, object? value, Func<Type?,string>? typeNameConverter);

Parameters

name
String

The name of the resource.

value
Object

The resource to store.

typeNameConverter
Func<Type,String>

A reference to a method that takes a Type and returns a string containing the Type name.

Exceptions

The resource named in value does not support serialization.

name is null.

name is a string of zero length.

Applies to

.NET Framework 4.8.1 och andra versioner
Produkt Versioner
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

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

Source:
ResXDataNode.cs
Source:
ResXDataNode.cs
Source:
ResXDataNode.cs

Initializes a new instance of the ResXDataNode class with a reference to a resource file.

C#
public ResXDataNode(string name, System.Resources.ResXFileRef fileRef, Func<Type,string> typeNameConverter);
C#
public ResXDataNode(string name, System.Resources.ResXFileRef fileRef, Func<Type?,string>? typeNameConverter);

Parameters

name
String

The name of the resource.

fileRef
ResXFileRef

The file reference to use as the resource.

typeNameConverter
Func<Type,String>

A reference to a method that takes a Type and returns a string containing the Type name.

Exceptions

name is null or fileRef is null.

name is a string of zero length.

Applies to

.NET Framework 4.8.1 och andra versioner
Produkt Versioner
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10