Server.ScriptCompiler.FindTypeByName C# (CSharp) Méthode

FindTypeByName() public static méthode

public static FindTypeByName ( string name ) : Type
name string
Résultat System.Type
		public static Type FindTypeByName( string name )
		{
			return FindTypeByName( name, true );
		}

Same methods

ScriptCompiler::FindTypeByName ( string name, bool ignoreCase ) : Type

Usage Example

Exemple #1
0
        public static bool ReadType(XmlElement xml, string attribute, ref Type value, bool mandatory)
        {
            string s = GetAttribute(xml, attribute, mandatory);

            if (s == null)
            {
                return(false);
            }

            Type type;

            try
            {
                type = ScriptCompiler.FindTypeByName(s, false);
            }
            catch
            {
                Console.WriteLine("Could not parse Type attribute '{0}' in element '{1}'", attribute, xml.Name);
                return(false);
            }

            if (type == null)
            {
                Console.WriteLine("Could not find Type '{0}'", s);
                return(false);
            }

            value = type;
            return(true);
        }
All Usage Examples Of Server.ScriptCompiler::FindTypeByName