Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# get list object type of generic list

Type type = pi.PropertyType;
if(type.IsGenericType && type.GetGenericTypeDefinition()
        == typeof(List<>))
{
    Type itemType = type.GetGenericArguments()[0]; // use this...
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: callling class c# 
Csharp :: how to turn on/off Particle System unity 
Csharp :: c# get distinct values all fields from list 
Csharp :: linq datatable 
Csharp :: serial number unity pro 
Csharp :: c# move form without border 
Csharp :: Commenting on C# 
Csharp :: same click event diffrenet buttonms c# 
Csharp :: unity initialize array 
Csharp :: slither io hack 
Csharp :: concatenation in c# 
Csharp :: how to redirect to another page in button clicked in asp.net c# index.cshtml 
Csharp :: cast from object to generic type c# 
Csharp :: how to see if a number is even c# 
Csharp :: unity dotween sequence 
Csharp :: onmousedown() not working unity 
Csharp :: group-by-in-linq 
Csharp :: c# validate xml 
Csharp :: c# divide two integers get float 
Csharp :: C# The request was aborted: Could not create SSL/TLS secure 
Csharp :: Get Component Trail rendere 
Csharp :: c# custom event handler with parameters 
Csharp :: C# webclient submit form 
Csharp :: get script directory c# 
Csharp :: c# int to string date conversion 
Csharp :: c# check port in remote pc 
Csharp :: toLocalIsoString() vs toIsoString() 
Csharp :: wpf binding ancestor codebehind 
Csharp :: c# ip address to string 
Csharp :: c# get out of for loop 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =