Click here to Skip to main content
15,849,262 members
Home / Discussions / C#
   

C#

 
GeneralRe: Button removed but not disposed Pin
netJP12L26-Jul-08 6:05
netJP12L26-Jul-08 6:05 
GeneralRe: Button removed but not disposed Pin
Ed.Poore26-Jul-08 9:58
Ed.Poore26-Jul-08 9:58 
Questiondeterming the full name to My Music on the start menu Pin
Jason Coggins25-Jul-08 17:56
Jason Coggins25-Jul-08 17:56 
AnswerRe: determing the full name to My Music on the start menu Pin
mr.mohsen25-Jul-08 22:37
mr.mohsen25-Jul-08 22:37 
AnswerRe: determing the full name to My Music on the start menu Pin
Ed.Poore25-Jul-08 23:54
Ed.Poore25-Jul-08 23:54 
AnswerRe: determing the full name to My Music on the start menu Pin
DaveyM6926-Jul-08 0:01
professionalDaveyM6926-Jul-08 0:01 
AnswerRe: determing the full name to My Music on the start menu Pin
Luc Pattyn26-Jul-08 3:47
sitebuilderLuc Pattyn26-Jul-08 3:47 
QuestionOverriding ToString() with arguments Pin
JoeRip25-Jul-08 17:05
JoeRip25-Jul-08 17:05 
I have a struct:

public struct IITObjectPersistentID
     {
         public int highID;
         public int lowID;

         public IITObjectPersistentID(int HighID, int LowID)
         {
             highID = HighID;
             lowID = LowID;
         }

         public override string ToString()
         {
             return "{" + highID.ToString() + "." + lowID.ToString() + "}";
         }
     }


I have overridden ToString(), but I want to be able to specify the normal ToString() arguments. Ie, I want to be able to get the hex display of the numbers, too, like:

IITObjectPersistentID OPIDx = new IITObjectPersistentID(25,50);
string displayAsHex = OPIDx.ToString("X");


How can I write conditional code in the override statement that lets me pass arguments to OPIDx.ToString() ?
AnswerRe: Overriding ToString() with arguments Pin
PIEBALDconsult25-Jul-08 20:35
mvePIEBALDconsult25-Jul-08 20:35 
GeneralRe: Overriding ToString() with arguments Pin
JoeRip26-Jul-08 0:13
JoeRip26-Jul-08 0:13 
GeneralRe: Overriding ToString() with arguments Pin
JoeRip26-Jul-08 0:51
JoeRip26-Jul-08 0:51 
GeneralRe: Overriding ToString() with arguments Pin
PIEBALDconsult26-Jul-08 4:35
mvePIEBALDconsult26-Jul-08 4:35 
AnswerRe: Overriding ToString() with arguments Pin
DaveyM6926-Jul-08 0:07
professionalDaveyM6926-Jul-08 0:07 
GeneralRe: Overriding ToString() with arguments Pin
JoeRip26-Jul-08 0:12
JoeRip26-Jul-08 0:12 
GeneralRe: Overriding ToString() with arguments Pin
DaveyM6926-Jul-08 0:29
professionalDaveyM6926-Jul-08 0:29 
GeneralRe: Overriding ToString() with arguments Pin
JoeRip26-Jul-08 0:43
JoeRip26-Jul-08 0:43 
AnswerRe: Overriding ToString() with arguments Pin
BhadeliaImran26-Jul-08 3:23
BhadeliaImran26-Jul-08 3:23 
AnswerRe: Overriding ToString() with arguments Pin
Luc Pattyn26-Jul-08 3:53
sitebuilderLuc Pattyn26-Jul-08 3:53 
Questionstatusstrip <---data Pin
nelsonpaixao25-Jul-08 15:34
nelsonpaixao25-Jul-08 15:34 
AnswerRe: statusstrip <---data Pin
Ed.Poore25-Jul-08 23:49
Ed.Poore25-Jul-08 23:49 
Questionform layout: rate this practice Pin
nelsonpaixao25-Jul-08 15:18
nelsonpaixao25-Jul-08 15:18 
AnswerRe: form layout: rate this practice Pin
PIEBALDconsult25-Jul-08 20:44
mvePIEBALDconsult25-Jul-08 20:44 
Questiondecoding gzip http response Pin
udikantz25-Jul-08 12:50
udikantz25-Jul-08 12:50 
QuestionWindows Services - Log On As User Account Pin
dataminers25-Jul-08 12:29
dataminers25-Jul-08 12:29 
AnswerRe: Windows Services - Log On As User Account Pin
Mark Salsbery25-Jul-08 14:59
Mark Salsbery25-Jul-08 14:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.