Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CanBeAssigned()

static bool System.ComponentModel.DataAnnotations.Validator.CanBeAssigned ( Type destinationType,
object value )
inlinestaticprivate

Definition at line 147 of file Validator.cs.

148 {
149 if (value == null)
150 {
151 if (destinationType.IsValueType)
152 {
153 if (destinationType.IsGenericType)
154 {
155 return destinationType.GetGenericTypeDefinition() == typeof(Nullable<>);
156 }
157 return false;
158 }
159 return true;
160 }
161 return destinationType.IsInstanceOfType(value);
162 }

References System.value.

Referenced by System.ComponentModel.DataAnnotations.Validator.EnsureValidPropertyType().