CSharp examples for System.Reflection:Type
Is type of Bool?
using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis; public class Main{ /// <summary> /// Is type of Bool? /// </summary> /// <param name="symbol"></param> /// <returns></returns> public static bool IsBool(this ITypeSymbol symbol) {/*from w w w . j a v a 2s. c o m*/ if (symbol == null) return false; return symbol.MetadataName == "Boolean"; } }