PexChoose.Value Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Value<T>(String) |
Gets a value of a specified type. |
Value<T>(String, Boolean, Boolean, Type[]) |
Gets a value from an argument list that is compatible with the specified type. |
Value<T>(String)
Gets a value of a specified type.
public:
generic <typename T>
static T Value(System::String ^ name);
public static T Value<T> (string name);
static member Value : string -> 'T
Public Shared Function Value(Of T) (name As String) As T
Type Parameters
- T
The value's type.
Parameters
- name
- String
The value's name.
Returns
Returns a value of type T.
See also
Applies to
Value<T>(String, Boolean, Boolean, Type[])
Gets a value from an argument list that is compatible with the specified type.
public:
generic <typename T>
where T : class static T Value(System::String ^ name, bool nonNull, bool allowSubtypes, ... cli::array <Type ^> ^ types);
public static T Value<T> (string name, bool nonNull, bool allowSubtypes, params Type[] types) where T : class;
static member Value : string * bool * bool * Type[] -> 'T (requires 'T : null)
Public Shared Function Value(Of T As Class) (name As String, nonNull As Boolean, allowSubtypes As Boolean, ParamArray types As Type()) As T
Type Parameters
- T
The value's type.
Parameters
- name
- String
The value's name.
- nonNull
- Boolean
Set to true
if the value must be non-null, an false
otherwise.
- allowSubtypes
- Boolean
Set to true
to allow Value
to also return subtypes of the specified type
and false
otherwise.
- types
- Type[]
One or more Type
objects.
Returns
Returns a value from one of the types in the argument list, including subtypes of those arguments if
nonNull
set to true
.