What is the difference between TypeOf and GetType?
Answer Posted / avinash reddy r
typeOf is based on a class
Ex: Console.WriteLine(typeof(int))
O/P: System.Int32
GetType is based on a object
string s="Hello World"
Ex: Console.WriteLine(s.GetType())
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What does the dispose method do with the connection object?
What is var c#?
What is strongly typed in c#?
How do you serialize an object?
What is Implementation inheritance and interface inheritance?
Which is faster array or arraylist in c#?
How many bits is int32?
Is int an object in c#?
Can you declare struct members as protected?
What is polymorphism and its types in c#?
What is a generic c#?
Can a class have multiple constructors c#?
What are verbatim strings in c#?
What is function c#?
Can a dictionary have duplicate keys c#?