Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

coverting from double to system string

Status
Not open for further replies.

souphmars

Technical User
Oct 28, 2004
34
US
i need help doin this - i have a gui - i have a textbox i am trying to output to, and it has to in string of course
thanks
 
Exactly what kind of string are you using?
If it's a .NET string, use the ToString() method.
If it's a CString, you can probably use the FormatString() method.
If it's an STL string, use a stringstream.
 
it is .NET - i have tried the ToString() , and it has not worked - show me an example how u use it i have tried both ways with no success
x->ToString() or x->ToString(x) - if u use it like the first way it should pop up in the box right after u put the arrow in - nothing pops up - please help - explain how to use format string please
 
Is x a double or a System.Double...?
I'm still reading a book on C# & .NET, so I might not be the best person to ask about .NET questions.

Try something like this:
Code:
System.String str = x.ToString();  // or -> if x is a pointer.
Put a breakpoint on the next line and run it in the debugger. See if str is set to the string value of x. If it is, set your textbox to str.

BTW, what type of object is your textbox?
What code are you using to set your textbox to x?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top