Изменения документа Сценарии
Редактировал(а) Alexandr Fokin 2024/09/30 14:14
От версии 1.5
отредактировано Alexandr Fokin
на 2023/05/14 09:55
на 2023/05/14 09:55
Изменить комментарий:
К данной версии нет комментариев
К версии 1.8
отредактировано Alexandr Fokin
на 2024/09/30 14:14
на 2024/09/30 14:14
Изменить комментарий:
К данной версии нет комментариев
Сводка
-
Свойства страницы (1 изменено, 0 добавлено, 0 удалено)
Подробности
- Свойства страницы
-
- Содержимое
-
... ... @@ -1,5 +1,9 @@ 1 -|(% style="width:174px" %) |(% style="width:1348px" %)Find Types in All Assemblies 1 +|(% style="width:174px" %)Поиск типа|(% style="width:1348px" %)((( 2 +|Find Types in All Assemblies 2 2 [[https:~~/~~/stackoverflow.com/questions/4692340/find-types-in-all-assemblies>>https://stackoverflow.com/questions/4692340/find-types-in-all-assemblies]] 4 +|{{code language="c#"}}var assemblyQualifiedName = type.AssemblyQualifiedName; 5 +Type.GetType(assemblyQualifiedName, throwOnError: false){{/code}} 6 +))) 3 3 |(% style="width:174px" %) |(% style="width:1348px" %)((( 4 4 Find a private field with Reflection? 5 5 [[https:~~/~~/stackoverflow.com/questions/95910/find-a-private-field-with-reflection>>https://stackoverflow.com/questions/95910/find-a-private-field-with-reflection]] ... ... @@ -13,5 +13,12 @@ 13 13 |(% style="width:174px" %)Получение типа независимо от nullable|(% style="width:1348px" %){{code language="c#"}}PropertyInfo prop; 14 14 var type = Nullable.GetUnderlyingType(prop.PropertyType) 15 15 ?? prop.PropertyType;{{/code}} 20 +|(% style="width:174px" %)Формирование конкретного типа на основе Generic|(% style="width:1348px" %)((( 21 +Type.MakeGenericType 22 +[[https:~~/~~/learn.microsoft.com/ru-ru/dotnet/api/system.type.makegenerictype?view=net-7.0>>https://learn.microsoft.com/ru-ru/dotnet/api/system.type.makegenerictype?view=net-7.0]] 16 16 24 +C# Type MakeGenericType 25 +[[http:~~/~~/www.java2s.com/Tutorials/CSharp/System/Type/C_Type_MakeGenericType.htm>>http://www.java2s.com/Tutorials/CSharp/System/Type/C_Type_MakeGenericType.htm]] 26 +))) 27 + 17 17