Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# tell if a class is a child or the class itself

void Main()
{
    typeof(Derived).IsSubclassOf(typeof(Base)).Dump();
    typeof(Base).IsSubclassOf(typeof(Base)).Dump();
}

public class Base { }
public class Derived : Base { }
Comment

PREVIOUS NEXT
Code Example
Csharp :: wpf keydown detect if control key is down 
Csharp :: c# clear linkList 
Csharp :: c# double without exponential notation 
Csharp :: c# multiplicate char 
Csharp :: how to make a system to check if i see certain object in unity 
Csharp :: trhow exception if is null c# 
Csharp :: c# networkstream read all bytes 
Csharp :: c# guid from string 
Csharp :: update a file where there is a keyword c# 
Csharp :: 2d array rows and columns in c# 
Csharp :: textbox gotfocus wpf 
Csharp :: the name scripts does not exist in the current context mvc 5 
Csharp :: c# list get last element 
Csharp :: run a command line from vb.net app 
Csharp :: how to insert data into multiple tables using asp.net c# 
Csharp :: c# how to make object rotate forever 
Csharp :: how to call last string from text file C# 
Csharp :: fill dictionary c# 
Csharp :: HttpClient .net Core add Certificate 
Csharp :: c# switch example 
Csharp :: c# how to initialize an array 
Csharp :: triangle calculator 
Csharp :: unity set cursor position 
Csharp :: Reporting Progress from Async Tasks c# 
Csharp :: RestRequest AdvancedResponseWriter site:stackoverflow.com 
Csharp :: rename join ta le in many to many 
Csharp :: avoid writing the name of the type twice 
Csharp :: what is napalm made of 
Csharp :: how to turn the textbox into char in windows forms 
Csharp :: set ByteArrayContent content type json 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =