Answers for "use gettype for integer in c#"

C#
3

get type of variable c#

string a = "This is a string";
Console.WriteLine(a.GetType())
Posted by: Guest on May-13-2020
0

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;
}
Posted by: Guest on January-07-2022

C# Answers by Framework

Browse Popular Code Answers by Language