C# Class MyType, shared-source-cli-2.0

Inheritance: EnumClass
Exibir arquivo Open project: gbarnett/shared-source-cli-2.0 Class Usage Examples

Public Methods

Method Description
MyType ( int inputValue ) : System
ToString ( string format, IFormatProvider provider ) : string

ToString() is the formatting method called by String.Format. This is the implementation of the ToString() overload required by the IFormattable interface which takes a format and a IFormatProvider. This *not* overriding the default implementation of ToString inherited from object since that base method takes no parameters. In this method we look for the "b" format which we respect or fall through to the default Int32 format for anything we don't know about.

Method Details

MyType() public method

public MyType ( int inputValue ) : System
inputValue int
return System

ToString() public method

ToString() is the formatting method called by String.Format. This is the implementation of the ToString() overload required by the IFormattable interface which takes a format and a IFormatProvider. This *not* overriding the default implementation of ToString inherited from object since that base method takes no parameters. In this method we look for the "b" format which we respect or fall through to the default Int32 format for anything we don't know about.
public ToString ( string format, IFormatProvider provider ) : string
format string
provider IFormatProvider
return string