Summary
Provides utilities for working with types at runtime.
- Namespace
- Avalonia
.Utilities - Base Types
-
- object
graph BT
Type-->Base0["object"]
Type["TypeUtilities"]
class Type type-node
Syntax
public static class TypeUtilities
Methods
Name | Value | Summary |
---|---|---|
AcceptsNull |
bool |
Returns a value indicating whether null can be assigned to the specified type.
static
|
ConvertImplicit |
T |
static
|
Convert |
object |
Convert a value to a type using the implicit conversions allowed by the C# language or
return the default for the type if the value could not be converted.
static
|
ConvertOrDefault |
object |
Convert a value to a type by any means possible, returning the default for that type
if the value could not be converted.
static
|
Default |
object |
Gets the default value for the specified type.
static
|
IsNumeric |
bool |
Determines if a type is numeric. Nullable numeric types are considered numeric.
static
|
TryConvert |
bool |
Try to convert a value to a type by any means possible.
static
|
TryConvertImplicit |
bool |
Try to convert a value to a type using the implicit conversions allowed by the C#
language.
static
|