Click here to Skip to main content
16,017,954 members
Home / Discussions / C#
   

C#

 
QuestionCan't run windows service Pin
saikat_0027-Nov-06 1:07
saikat_0027-Nov-06 1:07 
AnswerRe: Can't run windows service Pin
Weckmann27-Nov-06 3:56
Weckmann27-Nov-06 3:56 
QuestionSaving & Loading TreeView especially Tag of Nodes Pin
Andy Rama27-Nov-06 0:54
Andy Rama27-Nov-06 0:54 
AnswerRe: Saving & Loading TreeView especially Tag of Nodes Pin
Not Active27-Nov-06 3:33
mentorNot Active27-Nov-06 3:33 
Question[Message Deleted] Pin
shyamy27-Nov-06 0:11
shyamy27-Nov-06 0:11 
AnswerRe: Conversion Pin
ejuanpp27-Nov-06 1:09
ejuanpp27-Nov-06 1:09 
AnswerRe: Conversion Pin
AB777127-Nov-06 1:28
AB777127-Nov-06 1:28 
AnswerRe: Conversion Pin
Guffa27-Nov-06 1:44
Guffa27-Nov-06 1:44 
Comments:

shyamy wrote:
int Count=txtEnter.Text.Length,i=0;


Local variables are generally named with the first character in lower case, e.g. count instead of Count.

There is no reason to initalise the variable i, as you are not using it before you initialise it again in the loop.

for(i=Count;i>0;i--)


Why are you looping from Count to 1 instead of from Count-1 to 0?

txtChange.Text+=myString.Substring(i-1,1);


Use a StringBuilder to build the string. That way you don't create so many string objects. Using the += operator to concatenate strings scales very badly; the execution time increases exponetially for each character you add.

Instead of using SubString, use the indexer to get the character: myString[i-1], that way you use a char value to handle the character instead of creating another string object.


---
b { font-weight: normal; }

AnswerRe: Conversion Pin
albCode27-Nov-06 1:44
albCode27-Nov-06 1:44 
QuestionProblem with response.binarywrite() Pin
Anish Gangadharan27-Nov-06 0:10
Anish Gangadharan27-Nov-06 0:10 
AnswerRe: Problem with response.binarywrite() Pin
Guffa27-Nov-06 3:48
Guffa27-Nov-06 3:48 
GeneralRe: Problem with response.binarywrite() Pin
Anish Gangadharan27-Nov-06 20:35
Anish Gangadharan27-Nov-06 20:35 
AnswerRe: Problem with response.binarywrite() Pin
Guffa28-Nov-06 3:03
Guffa28-Nov-06 3:03 
GeneralRe: Problem with response.binarywrite() Pin
Anish Gangadharan28-Nov-06 17:16
Anish Gangadharan28-Nov-06 17:16 
AnswerRe: Problem with response.binarywrite() Pin
Guffa28-Nov-06 20:28
Guffa28-Nov-06 20:28 
GeneralRe: Problem with response.binarywrite() Pin
Anish Gangadharan28-Nov-06 22:24
Anish Gangadharan28-Nov-06 22:24 
AnswerRe: Problem with response.binarywrite() Pin
Guffa28-Nov-06 22:33
Guffa28-Nov-06 22:33 
GeneralRe: Problem with response.binarywrite() Pin
Anish Gangadharan28-Nov-06 23:20
Anish Gangadharan28-Nov-06 23:20 
AnswerRe: Problem with response.binarywrite() Pin
Guffa29-Nov-06 1:24
Guffa29-Nov-06 1:24 
QuestionHow do i fire a event from the AsycnCallBack right ? [modified] Pin
MarkPhB27-Nov-06 0:02
MarkPhB27-Nov-06 0:02 
AnswerRe: How do i fire a event from the AsycnCallBack right ? Pin
Stefan Troschuetz27-Nov-06 1:34
Stefan Troschuetz27-Nov-06 1:34 
GeneralRe: How do i fire a event from the AsycnCallBack right ? Pin
MarkPhB27-Nov-06 5:19
MarkPhB27-Nov-06 5:19 
GeneralRe: How do i fire a event from the AsycnCallBack right ? Pin
Stefan Troschuetz27-Nov-06 6:21
Stefan Troschuetz27-Nov-06 6:21 
QuestionDatagridview Pin
Skajus26-Nov-06 23:58
Skajus26-Nov-06 23:58 
QuestionCrystalReport 11.5 with VisualStudio.net 2005 Pin
bahaa_sa526-Nov-06 23:50
bahaa_sa526-Nov-06 23:50 

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.