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 is difference between struct and class in c#?
Why ref is used in c#?
Is c# an open source?
Give 2 scenarios where static constructors can be used?
What is static and use of it?
what is IFormatable
What is arraylist?
What is streamreader/streamwriter class?
Why are mutable structs evil?
In the page load event I assigned dropdownlist’s datasource property to a valid list. On the submit button click.. The same datasource property is coming as null. Why?
What is difference between abstract class and interface in c#?
Can a sealed class be used as a base class?
What is interpolation in programming?
Can I use exceptions in c#?
Is c# or c++ better for games?