Click here to Skip to main content
15,889,335 members
Home / Discussions / C#
   

C#

 
GeneralRe: Regarding implementation of Dependency Injection with C# Pin
Pete O'Hanlon10-Jan-13 21:11
mvePete O'Hanlon10-Jan-13 21:11 
QuestionHow to draw an arc in winRT with animation? Pin
abinashokk9-Jan-13 21:55
abinashokk9-Jan-13 21:55 
AnswerRe: How to draw an arc in winRT with animation? Pin
Pete O'Hanlon9-Jan-13 22:34
mvePete O'Hanlon9-Jan-13 22:34 
QuestionC#.NET 3.5 Code review checklist Pin
Member 31370789-Jan-13 20:28
Member 31370789-Jan-13 20:28 
AnswerRe: C#.NET 3.5 Code review checklist Pin
Eddy Vluggen9-Jan-13 22:54
professionalEddy Vluggen9-Jan-13 22:54 
AnswerRe: C#.NET 3.5 Code review checklist Pin
Deflinek10-Jan-13 0:53
Deflinek10-Jan-13 0:53 
AnswerRe: C#.NET 3.5 Code review checklist Pin
jschell10-Jan-13 14:06
jschell10-Jan-13 14:06 
GeneralRe: C#.NET 3.5 Code review checklist Pin
PIEBALDconsult10-Jan-13 15:16
mvePIEBALDconsult10-Jan-13 15:16 
Right, it should mention loops.

I'd also say not to throw away a perfectly good StringBuilder just to create another; reuse it if possible.

One thing I've seen done all too often is something like:

for each row in a table
  instantiate a StringBuilder (with the default length of 16 no less!)
  for each column
    Append a comma (possibly with a test first)
    Append the value
  write it somewhere with ToString()


A better pattern is:

instantiate a StringBuilder (ideally with some estimate of how much space is required by the longest record)
for each row in a table
  set the StringBuilder's Length to 0
  for each column
    AppendFormat the value and a comma
  write it somewhere with ToString ( 0 , Length-1 ) to eliminate the extraneous comma

GeneralRe: C#.NET 3.5 Code review checklist Pin
PIEBALDconsult10-Jan-13 14:46
mvePIEBALDconsult10-Jan-13 14:46 
QuestionSocket programming Pin
mohammadkaab9-Jan-13 3:32
mohammadkaab9-Jan-13 3:32 
AnswerRe: Socket programming Pin
Dave Kreskowiak9-Jan-13 3:38
mveDave Kreskowiak9-Jan-13 3:38 
GeneralRe: Socket programming Pin
mohammadkaab9-Jan-13 7:13
mohammadkaab9-Jan-13 7:13 
GeneralRe: Socket programming Pin
Dave Kreskowiak9-Jan-13 9:02
mveDave Kreskowiak9-Jan-13 9:02 
GeneralRe: Socket programming Pin
mohammadkaab9-Jan-13 9:25
mohammadkaab9-Jan-13 9:25 
GeneralRe: Socket programming Pin
Dave Kreskowiak10-Jan-13 2:11
mveDave Kreskowiak10-Jan-13 2:11 
AnswerRe: Socket programming Pin
Keith Barrow9-Jan-13 4:15
professionalKeith Barrow9-Jan-13 4:15 
GeneralRe: Socket programming Pin
mohammadkaab9-Jan-13 10:29
mohammadkaab9-Jan-13 10:29 
AnswerRe: Socket programming Pin
Richard MacCutchan9-Jan-13 4:42
mveRichard MacCutchan9-Jan-13 4:42 
AnswerRe: Socket programming Pin
Pete O'Hanlon9-Jan-13 5:27
mvePete O'Hanlon9-Jan-13 5:27 
AnswerRe: Socket programming Pin
harold aptroot9-Jan-13 6:14
harold aptroot9-Jan-13 6:14 
AnswerRe: Socket programming Pin
Thomas Daniels9-Jan-13 6:47
mentorThomas Daniels9-Jan-13 6:47 
QuestionLooking for a specific regex Pin
Dennis Bork8-Jan-13 21:31
Dennis Bork8-Jan-13 21:31 
AnswerRe: Looking for a specific regex Pin
Pete O'Hanlon8-Jan-13 22:27
mvePete O'Hanlon8-Jan-13 22:27 
AnswerRe: Looking for a specific regex Pin
savbace8-Jan-13 23:49
savbace8-Jan-13 23:49 
AnswerRe: Looking for a specific regex Pin
lmoelleb9-Jan-13 0:12
lmoelleb9-Jan-13 0:12 

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.