What is the difference between typeof(), GetType() and is?
here is an example.
class Employee { } class Developer : Employee { } void PrintTypes(Employee e) { print(e.GetType() == typeof(Employee)) // false print(e is Employee) // true print(e.GetType() == typeof(Developer)) // true }
RT @CodeSnippetsNET: Difference between typeof(), GetType() and IS in C# and #VB .NET http://t.co/jIkNa5G4Qq #csharp #visualbasic #dotnet #…
RT @CodeSnippetsNET: Difference between typeof(), GetType() and IS in C# and #VB .NET http://t.co/jIkNa5G4Qq #csharp #visualbasic #dotnet #…
RT @CodeSnippetsNET: Difference between typeof(), GetType() and IS in C# and #VB .NET http://t.co/jIkNa5G4Qq #csharp #visualbasic #dotnet #…
RT @CodeSnippetsNET: Difference between typeof(), GetType() and IS in C# and #VB .NET http://t.co/jIkNa5G4Qq #csharp #visualbasic #dotnet #…
RT @CodeSnippetsNET: Difference between typeof(), GetType() and IS in C# and #VB .NET http://t.co/jIkNa5G4Qq #csharp #visualbasic #dotnet #…
RT @CodeSnippetsNET: Difference between typeof(), GetType() and IS in C# and #VB .NET http://t.co/jIkNa5G4Qq #csharp #visualbasic #dotnet #…
RT @CodeSnippetsNET: Difference between typeof(), GetType() and IS in C# and #VB .NET http://t.co/jIkNa5G4Qq #csharp #visualbasic #dotnet #…