Click here to Skip to main content
15,910,980 members
Home / Discussions / C#
   

C#

 
QuestionHelp Required in Assembly Pin
kc_krishnan17-Oct-07 20:59
kc_krishnan17-Oct-07 20:59 
Questionre:internet dialer Pin
RameshwerE17-Oct-07 20:42
RameshwerE17-Oct-07 20:42 
AnswerRe: re:internet dialer Pin
Abhijit Jana17-Oct-07 20:52
professionalAbhijit Jana17-Oct-07 20:52 
GeneralRe: re:internet dialer Pin
RameshwerE17-Oct-07 21:26
RameshwerE17-Oct-07 21:26 
GeneralRe: re:internet dialer Pin
Abhijit Jana17-Oct-07 21:32
professionalAbhijit Jana17-Oct-07 21:32 
QuestionUse property or field Pin
Maddie from Dartford17-Oct-07 20:32
Maddie from Dartford17-Oct-07 20:32 
AnswerRe: Use property or field Pin
half-life17-Oct-07 20:57
half-life17-Oct-07 20:57 
AnswerRe: Use property or field Pin
Guffa17-Oct-07 22:05
Guffa17-Oct-07 22:05 
If you want to access the internal value, use the variable. If you want to access the value as it would be accessed outside the class, use the property.

gajesh wrote:
If i directly modify the variable, i am reducing one call which might give better efficiency.


If the code for the property is simple, it will be inlined where you use it, and optimised down to just accessing the internal variable. So in most cases there is no difference in performance between using the property and using the variable.

---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams

QuestionODBC Pin
half-life17-Oct-07 20:17
half-life17-Oct-07 20:17 
AnswerRe: ODBC Pin
Abhijit Jana17-Oct-07 20:33
professionalAbhijit Jana17-Oct-07 20:33 
GeneralRe: ODBC Pin
half-life17-Oct-07 20:47
half-life17-Oct-07 20:47 
GeneralRe: ODBC Pin
Abhijit Jana17-Oct-07 21:01
professionalAbhijit Jana17-Oct-07 21:01 
GeneralRe: ODBC Pin
half-life17-Oct-07 21:11
half-life17-Oct-07 21:11 
GeneralRe: ODBC Pin
Abhijit Jana17-Oct-07 22:28
professionalAbhijit Jana17-Oct-07 22:28 
GeneralRe: ODBC Pin
Abhijit Jana17-Oct-07 22:58
professionalAbhijit Jana17-Oct-07 22:58 
AnswerRe: ODBC Pin
V.17-Oct-07 21:02
professionalV.17-Oct-07 21:02 
GeneralRe: ODBC Pin
half-life17-Oct-07 21:08
half-life17-Oct-07 21:08 
GeneralRe: ODBC Pin
V.17-Oct-07 22:19
professionalV.17-Oct-07 22:19 
GeneralRe: ODBC Pin
half-life17-Oct-07 22:25
half-life17-Oct-07 22:25 
GeneralRe: ODBC Pin
V.17-Oct-07 22:30
professionalV.17-Oct-07 22:30 
GeneralRe: ODBC Pin
half-life17-Oct-07 22:30
half-life17-Oct-07 22:30 
GeneralRe: ODBC Pin
V.17-Oct-07 22:37
professionalV.17-Oct-07 22:37 
GeneralRe: ODBC Pin
half-life17-Oct-07 22:48
half-life17-Oct-07 22:48 
GeneralRe: ODBC Pin
Abhijit Jana17-Oct-07 22:57
professionalAbhijit Jana17-Oct-07 22:57 
GeneralRe: ODBC Pin
V.17-Oct-07 23:04
professionalV.17-Oct-07 23:04 

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.