c# compare type
using System;
using System.Reflection;
class Example
{
public static void Main()
{
Type a = typeof(System.String);
Type b = typeof(System.Int32);
Console.WriteLine("{0} == {1}: {2}", a, b, a.Equals(b));
// The Type objects in a and b are not equal,
// because they represent different types.
a = typeof(Example);
b = new Example().GetType();
Console.WriteLine("{0} is equal to {1}: {2}", a, b, a.Equals(b));
// The Type objects in a and b are equal,
// because they both represent type Example.
b = typeof(Type);
Console.WriteLine("typeof({0}).Equals(typeof({1})): {2}", a, b, a.Equals(b));
// The Type objects in a and b are not equal,
// because variable a represents type Example
// and variable b represents type Type.
//Console.ReadLine();
}
}
Also in C#:
- math class C# exponents
- can send but cannot receive email dreamhost email
- how to redirect to extern page in .net core
- c# xml file builder
- for each property in object c#
- winforms c# add data to datagridview with a button
- javascript append
- visual studio clear text script
- unity3d quaternion add 90 degrees
- POST http://localhost:5001/api/v1/identity/login 500 (Internal Server Error) LoginForm.jsx:39 Error: Request failed with status code 500 at createError (createError.js:16) at settle (settle.js:17) at XMLHttpRequest.handleLoad (xhr.js:61)
- c# object to json string
- how do I attach a player with a navMeshAgent
- .net core session
- c# get cpu id
- unity how to set an objects postion x,y,z
- unity load text resources from subfolder
- initialise icollection c#
- unity remove gameobject
- how to convert object in string JSON c#
- get hash c#
- create new object from generic c#
- unity to integer
- Assets/Scripts/Snake.cs(187,10): error CS0029: Cannot implicitly convert type `UnityEngine.Vector2Int' to `System.Collections.Generic.List<UnityEngine.Vector2Int>'
- C# sprint key