TypeUtilities Class
Provides utilities for working with types at runtime.
Definition
Namespace: Avalonia.Utilities
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
public static class TypeUtilities
Public NotInheritable Class TypeUtilities
[<AbstractClassAttribute>]
[<SealedAttribute>]
type TypeUtilities = class end
| Inheritance | Object → TypeUtilities |
Methods
| AcceptsNull(Type) | Returns a value indicating whether null can be assigned to the specified type. |
| AcceptsNull(T)() | Returns a value indicating whether null can be assigned to the specified type. |
| CanCast(T)(Object) | Returns a value indicating whether value can be casted to the specified type. If value is null, checks if instances of that type can be null. |
| ConvertImplicit(T)(Object) | |
| ConvertImplicitOrDefault(Object, Type) | 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. |
| ConvertOrDefault(Object, Type, CultureInfo) | Convert a value to a type by any means possible, returning the default for that type if the value could not be converted. |
| Default(Type) | Gets the default value for the specified type. |
| IsNumeric(Type) | Determines if a type is numeric. Nullable numeric types are considered numeric. |
| TryConvert(Type, Object, CultureInfo, Object) | Try to convert a value to a type by any means possible. |
| TryConvertImplicit(Type, Object, Object) | Try to convert a value to a type using the implicit conversions allowed by the C# language. |