fCraft.Color.GetName C# (CSharp) Method

GetName() private method

private GetName ( char code ) : string
code char
return string
        public static string GetName( char code ) {
            code = Char.ToLower( code );
            if ( IsValidColorCode( code ) ) {
                return ColorNames[code];
            }
            string color = Parse( code );
            if ( color == null ) {
                return null;
            }
            return ColorNames[color[1]];
        }

Same methods

Color::GetName ( int index ) : string
Color::GetName ( string color ) : string

Usage Example

 public override string GetPresentationString(string value)
 {
     if (value == null)
     {
         throw new ArgumentNullException("value");
     }
     return(String.Format("{0} ({1})",
                          Color.GetName(value), Color.Parse(value)));
 }
All Usage Examples Of fCraft.Color::GetName