C# Class Smrf.AppLib.ObjectWithText

Stores an object along with text that describes the object.
ToString is overridden to return the text.

This object can be used to populate a ListBox or ComboBox with arbitrary objects. See ComboBoxPlus.PopulateWithObjectsAndText.

Inheritance: Object, IComparable
Show file Open project: 2014-sed-team3/term-project Class Usage Examples

Protected Properties

Property Type Description
m_oObject Object
m_sText String

Public Methods

Method Description
CompareTo ( Object oOtherObject ) : Int32
ObjectWithText ( Object oObject, String sText ) : System

Initializes a new instance of the ObjectWithText class.

ToString ( ) : String

Private Methods

Method Description
AssertValid ( ) : void

Method Details

CompareTo() public method

public CompareTo ( Object oOtherObject ) : Int32
oOtherObject Object
return System.Int32

ObjectWithText() public method

Initializes a new instance of the ObjectWithText class.
public ObjectWithText ( Object oObject, String sText ) : System
oObject Object /// An arbitrary object, or null. ///
sText String /// Text describing the object. ///
return System

ToString() public method

public ToString ( ) : String
return String

Property Details

m_oObject protected property

protected Object m_oObject
return Object

m_sText protected property

protected String m_sText
return String