Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
GeneralRe: The SetAttribute does not set attribute Pin
Meysam Toluie20-Apr-13 3:02
Meysam Toluie20-Apr-13 3:02 
GeneralRe: The SetAttribute does not set attribute Pin
Jasmine250122-Apr-13 5:24
Jasmine250122-Apr-13 5:24 
AnswerRe: The SetAttribute does not set attribute Pin
OriginalGriff17-Apr-13 8:41
mveOriginalGriff17-Apr-13 8:41 
GeneralRe: The SetAttribute does not set attribute Pin
Meysam Toluie17-Apr-13 19:35
Meysam Toluie17-Apr-13 19:35 
GeneralRe: The SetAttribute does not set attribute Pin
dusty_dex17-Apr-13 23:46
dusty_dex17-Apr-13 23:46 
QuestionWhich Constructor is Better? Pin
Jasmine250116-Apr-13 12:15
Jasmine250116-Apr-13 12:15 
AnswerRe: Which Constructor is Better? Pin
Matt T Heffron16-Apr-13 12:47
professionalMatt T Heffron16-Apr-13 12:47 
GeneralRe: Which Constructor is Better? Pin
Jasmine250116-Apr-13 14:34
Jasmine250116-Apr-13 14:34 
If I had given you the real name of the class in the code I'm working with it would be obvious, but yeah the setting value and the key can not change for the life of the application. In fact, I think the class might actually be a singleton for our app but I need to discuss that first with the previous developer. Once it's read, it's always the same, so I think the "static readonly" is the right modifier for it. Thanks for the help, that makes a lot of sense Smile | :)

Also, I know it's excessively trivial, but my objection to the named constant is - wouldn't that take a memory location we don't need to use? The compiler doesn't know that it will only be used once, so it's going to stick that in a memory location, right? So then, what we have is two instances of the string in memory, right? Once in the code and once in the heap? If you do this a thousand times, you waste a K of memory. I know, I know, who cares about a lousy 1K of memory...

(programmers not giving a crap about saving 1K of memory when they can is probably why my favorite pinball game no longer works well on my tablet, and I find it annoying. I find the bloat in modern software really annoying, even when it doesn't cause bugs or performance issues)
GeneralRe: Which Constructor is Better? Pin
PIEBALDconsult16-Apr-13 15:01
mvePIEBALDconsult16-Apr-13 15:01 
GeneralRe: Which Constructor is Better? Pin
Jasmine250117-Apr-13 5:36
Jasmine250117-Apr-13 5:36 
GeneralRe: Which Constructor is Better? Pin
Matt T Heffron17-Apr-13 9:53
professionalMatt T Heffron17-Apr-13 9:53 
GeneralRe: Which Constructor is Better? Pin
Jasmine250117-Apr-13 9:57
Jasmine250117-Apr-13 9:57 
GeneralRe: Which Constructor is Better? Pin
Matt T Heffron17-Apr-13 10:02
professionalMatt T Heffron17-Apr-13 10:02 
GeneralRe: Which Constructor is Better? Pin
Jasmine250117-Apr-13 10:04
Jasmine250117-Apr-13 10:04 
AnswerRe: Which Constructor is Better? Pin
Matt T Heffron17-Apr-13 10:07
professionalMatt T Heffron17-Apr-13 10:07 
GeneralRe: Which Constructor is Better? Pin
Matt T Heffron17-Apr-13 13:35
professionalMatt T Heffron17-Apr-13 13:35 
AnswerRe: Which Constructor is Better? Pin
V.16-Apr-13 20:23
professionalV.16-Apr-13 20:23 
AnswerRe: Which Constructor is Better? Pin
Orjan Westin16-Apr-13 22:45
professionalOrjan Westin16-Apr-13 22:45 
GeneralRe: Which Constructor is Better? Pin
Richard Deeming17-Apr-13 0:39
mveRichard Deeming17-Apr-13 0:39 
GeneralRe: Which Constructor is Better? Pin
Orjan Westin17-Apr-13 1:58
professionalOrjan Westin17-Apr-13 1:58 
GeneralRe: Which Constructor is Better? Pin
Jasmine250117-Apr-13 5:39
Jasmine250117-Apr-13 5:39 
AnswerRe: Which Constructor is Better? Pin
jschell17-Apr-13 9:18
jschell17-Apr-13 9:18 
GeneralRe: Which Constructor is Better? Pin
Jasmine250117-Apr-13 9:28
Jasmine250117-Apr-13 9:28 
QuestionLoading Very Large DataSet Without losing any information Pin
losan16-Apr-13 7:23
losan16-Apr-13 7:23 
AnswerRe: Loading Very Large DataSet Without losing any information Pin
Dave Kreskowiak16-Apr-13 7:58
mveDave Kreskowiak16-Apr-13 7:58 

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.