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

◆ GetProperties() [3/4]

override? PropertyDescriptorCollection System.ComponentModel.ArrayConverter.GetProperties ( ITypeDescriptorContext? context,
object? value,
Attribute?[] attributes )
inline

Definition at line 51 of file ArrayConverter.cs.

52 {
53 if (value == null)
54 {
55 return null;
56 }
57 if (!(value is Array array))
58 {
59 return new PropertyDescriptorCollection(null);
60 }
61 int length = array.GetLength(0);
62 PropertyDescriptor[] array2 = new PropertyDescriptor[length];
63 Type type = value.GetType();
64 Type elementType = type.GetElementType();
65 for (int i = 0; i < length; i++)
66 {
67 array2[i] = new ArrayPropertyDescriptor(type, elementType, i);
68 }
69 return new PropertyDescriptorCollection(array2);
70 }

References System.array, System.elementType, System.Type.GetElementType(), System.Type.GetType(), System.length, System.type, and System.value.