Server.Mobiles.Spawner.ParseType C# (CSharp) Méthode

ParseType() public static méthode

public static ParseType ( string s ) : string
s string
Résultat string
		public static string ParseType( string s )
		{
			return s.Split( null, 2 )[0];
		}

Usage Example

        public List <string> CreateArray(RelayInfo info, Mobile from)
        {
            List <string> creaturesName = new List <string>();

            for (int i = 0; i < 13; i++)
            {
                TextRelay te = info.GetTextEntry(i);

                if (te != null)
                {
                    string str = te.Text;

                    if (str.Length > 0)
                    {
                        str = str.Trim();

                        string t = Spawner.ParseType(str);

                        Type type = ScriptCompiler.FindTypeByName(t);

                        if (type != null)
                        {
                            creaturesName.Add(str);
                        }
                        else
                        {
                            from.SendMessage("{0} is not a valid type name.", t);
                        }
                    }
                }
            }

            return(creaturesName);
        }
All Usage Examples Of Server.Mobiles.Spawner::ParseType