Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

get type of variable c#

string a = "This is a string";
Console.WriteLine(a.GetType())
Comment

C# GetType

public static Type GetType(string typeName)
{
    var type = Type.GetType(typeName);
    if (type != null) return type;
    foreach (var a in AppDomain.CurrentDomain.GetAssemblies())
    {
        type = a.GetType(typeName);
        if (type != null)
            return type;
    }
    return null;
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: viewBag as a list 
Csharp :: c# list foreach lambda multiple actions 
Csharp :: euler to quaternion 
Csharp :: C# linq mselect 
Csharp :: how to decrease velocity of a Unity rigidbody 
Csharp :: convert path to uri c# 
Csharp :: c# datagridview set column header alignment 
Csharp :: c# write line 
Csharp :: c# while loop 
Csharp :: c# generate random int list 
Csharp :: sieve 
Csharp :: unity c# find object position in array 
Csharp :: global exception handler c# 
Csharp :: kendo validator tries to validate hidden fields 
Csharp :: how to write text in specific position in c# 
Csharp :: clickable table row asp.net core 
Csharp :: how to customize xunit input 
Csharp :: convert getdate to ist c# 
Csharp :: get all properties of an object including children c# 
Csharp :: spiral matrix 
Csharp :: pricipal permission attribute in c# 
Csharp :: cant find desktop and documents folder macOs 
Csharp :: wpf keydown detect if control key is down 
Csharp :: convert video to byte array c# 
Csharp :: Count the Number of Duplicate Characters 
Csharp :: c# temporary files 
Csharp :: web.config customerrors not working 
Csharp :: c# move directory 
Csharp :: c# string across multiple lines 
Csharp :: list to ilist c# 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =