Click here to Skip to main content
15,891,033 members
Home / Discussions / C#
   

C#

 
Questioncombobox database value Pin
msogun9-Apr-07 3:36
msogun9-Apr-07 3:36 
AnswerRe: combobox database value Pin
Colin Angus Mackay9-Apr-07 3:42
Colin Angus Mackay9-Apr-07 3:42 
QuestionWhich is better C# or VC++.NET Pin
BlrBoy9-Apr-07 2:33
BlrBoy9-Apr-07 2:33 
AnswerRe: Which is better C# or VC++.NET Pin
Colin Angus Mackay9-Apr-07 3:41
Colin Angus Mackay9-Apr-07 3:41 
QuestionBetter to save locally? Pin
Aaron VanWieren9-Apr-07 2:27
Aaron VanWieren9-Apr-07 2:27 
AnswerRe: Better to save locally? Pin
Colin Angus Mackay9-Apr-07 3:40
Colin Angus Mackay9-Apr-07 3:40 
GeneralRe: Better to save locally? Pin
Aaron VanWieren9-Apr-07 5:47
Aaron VanWieren9-Apr-07 5:47 
GeneralRe: Better to save locally? Pin
Colin Angus Mackay9-Apr-07 6:22
Colin Angus Mackay9-Apr-07 6:22 
Oh, I see. Well, if it is something as simple as accessing a field then I don't think there is much advantage in saving it locally. Also, you really ought not to be accessing the fields of a class directly from outside the class in which it is declared.

If you are accessing a property then there possibily is an advantage is saving it locally. The property could, for example, have to do a look up each time it is called - That takes time, so it would be better if that didn't have to happen.

Often, I'll save the value locally for improved readability more than any other reason. All those excessively long lines can be difficult to debug, especially if you are stepping through code and you keep stepping in and out of properties in one line of code.


Upcoming events:
* Edinburgh: Web Security Conference Day for Windows Developers (12th April)
* Glasgow: Introduction to AJAX (2nd May), SQL Server, Mock Objects

Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton


My website

GeneralRe: Better to save locally? Pin
Aaron VanWieren9-Apr-07 6:33
Aaron VanWieren9-Apr-07 6:33 
QuestionHow to invoke web service method in C#.Net Pin
shanthivasan9-Apr-07 2:25
shanthivasan9-Apr-07 2:25 
AnswerRe: How to invoke web service method in C#.Net Pin
WillemM9-Apr-07 7:01
WillemM9-Apr-07 7:01 
QuestionReport Viewer Pin
vinayak baddi9-Apr-07 2:07
vinayak baddi9-Apr-07 2:07 
QuestionHow to create Poker Game!!! Pin
DukeKing9-Apr-07 1:41
DukeKing9-Apr-07 1:41 
AnswerRe: How to create Poker Game!!! Pin
Colin Angus Mackay9-Apr-07 1:50
Colin Angus Mackay9-Apr-07 1:50 
GeneralRe: How to create Poker Game!!! Pin
Leslie Sanford9-Apr-07 5:35
Leslie Sanford9-Apr-07 5:35 
GeneralRe: How to create Poker Game!!! Pin
Dan Neely9-Apr-07 5:48
Dan Neely9-Apr-07 5:48 
GeneralRe: How to create Poker Game!!! Pin
DukeKing9-Apr-07 5:39
DukeKing9-Apr-07 5:39 
AnswerRe: How to create Poker Game!!! Pin
Sean Michael Murphy9-Apr-07 2:39
Sean Michael Murphy9-Apr-07 2:39 
GeneralRe: How to create Poker Game!!! Pin
DukeKing9-Apr-07 5:44
DukeKing9-Apr-07 5:44 
QuestionHow to display customize value in ComboBox Pin
indiaone9-Apr-07 1:32
indiaone9-Apr-07 1:32 
AnswerRe: How to display customize value in ComboBox Pin
SABhatti9-Apr-07 3:29
SABhatti9-Apr-07 3:29 
AnswerRe: How to display customize value in ComboBox Pin
PS@Codeproj9-Apr-07 19:35
PS@Codeproj9-Apr-07 19:35 
QuestionDataGridView Pin
719-Apr-07 1:11
719-Apr-07 1:11 
QuestionSelect Operation in ComboBox Pin
AL3600B9-Apr-07 0:20
AL3600B9-Apr-07 0:20 
AnswerRe: Select Operation in ComboBox Pin
Colin Angus Mackay9-Apr-07 1:11
Colin Angus Mackay9-Apr-07 1:11 

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.