Click here to Skip to main content
15,881,413 members
Home / Discussions / C#
   

C#

 
GeneralRe: Enable button on form1 while inside form2 Pin
tonyonlinux18-Jan-10 17:24
tonyonlinux18-Jan-10 17:24 
QuestionHow can i find all open / active windows ? Pin
Yanshof17-Jan-10 22:22
Yanshof17-Jan-10 22:22 
AnswerRe: How can i find all open / active windows ? Pin
dan!sh 17-Jan-10 23:18
professional dan!sh 17-Jan-10 23:18 
AnswerRe: How can i find all open / active windows ? Pin
April Fans18-Jan-10 15:27
April Fans18-Jan-10 15:27 
QuestionIs it a Bug ? Pin
Xmen Real 17-Jan-10 22:15
professional Xmen Real 17-Jan-10 22:15 
AnswerRe: Is it a Bug ? Pin
dan!sh 17-Jan-10 22:26
professional dan!sh 17-Jan-10 22:26 
GeneralRe: Is it a Bug ? Pin
Xmen Real 17-Jan-10 23:16
professional Xmen Real 17-Jan-10 23:16 
GeneralRe: Is it a Bug ? Pin
#realJSOP18-Jan-10 0:01
mve#realJSOP18-Jan-10 0:01 
It's also bad form to not properly scope your statement. It makes the code much easier to read:

string text = "A";
string newText = "Some text that wont appear, " + ((text == "A") ? "its A" : "its something else"); 


Next, you should use string.Format or a StringBuilder object when your doing something like this. It's more efficient in terms of memory use.

string text = "A";
string newText = string.Format("Some text that wont appear, {0}", (text == "A") ? "its A" : "its something else"); 

StringBuilder newText2 = new StringBuilder("");
newText2.AppendFormat("Some text that wont appear, {0}", (text == "A") ? "its A" : "its something else"); 


.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

AnswerRe: Is it a Bug ? Pin
OriginalGriff17-Jan-10 23:27
mveOriginalGriff17-Jan-10 23:27 
Questionmynamespace.App app = new mynamespace.App() Pin
V.17-Jan-10 21:42
professionalV.17-Jan-10 21:42 
AnswerRe: mynamespace.App app = new mynamespace.App() Pin
Abhinav S17-Jan-10 22:37
Abhinav S17-Jan-10 22:37 
GeneralRe: mynamespace.App app = new mynamespace.App() Pin
V.18-Jan-10 19:48
professionalV.18-Jan-10 19:48 
Questionc# string operation Pin
AndieDu17-Jan-10 18:14
AndieDu17-Jan-10 18:14 
AnswerRe: c# string operation Pin
Sagar Khairnar 5517-Jan-10 19:04
professionalSagar Khairnar 5517-Jan-10 19:04 
AnswerRe: c# string operation Pin
PIEBALDconsult17-Jan-10 19:05
mvePIEBALDconsult17-Jan-10 19:05 
GeneralRe: c# string operation Pin
AndieDu17-Jan-10 19:11
AndieDu17-Jan-10 19:11 
GeneralRe: c# string operation Pin
Abhinav S17-Jan-10 20:29
Abhinav S17-Jan-10 20:29 
GeneralRe: c# string operation Pin
OriginalGriff17-Jan-10 21:55
mveOriginalGriff17-Jan-10 21:55 
AnswerRe: c# string operation Pin
OriginalGriff17-Jan-10 21:56
mveOriginalGriff17-Jan-10 21:56 
GeneralRe: c# string operation Pin
AndieDu17-Jan-10 23:01
AndieDu17-Jan-10 23:01 
AnswerRe: c# string operation Pin
theOzLizard17-Jan-10 22:13
theOzLizard17-Jan-10 22:13 
GeneralRe: c# string operation Pin
OriginalGriff17-Jan-10 23:31
mveOriginalGriff17-Jan-10 23:31 
GeneralRe: c# string operation Pin
theOzLizard18-Jan-10 8:43
theOzLizard18-Jan-10 8:43 
GeneralRe: c# string operation Pin
PIEBALDconsult18-Jan-10 16:18
mvePIEBALDconsult18-Jan-10 16:18 
GeneralRe: c# string operation Pin
theOzLizard18-Jan-10 18:07
theOzLizard18-Jan-10 18:07 

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.