Click here to Skip to main content
15,921,941 members
Home / Discussions / C#
   

C#

 
AnswerRe: Conflciting in strong name assembly Pin
Mark Salsbery27-Oct-08 5:27
Mark Salsbery27-Oct-08 5:27 
GeneralRe: Conflciting in strong name assembly Pin
led mike27-Oct-08 5:54
led mike27-Oct-08 5:54 
GeneralRe: Conflciting in strong name assembly Pin
George_George30-Oct-08 3:33
George_George30-Oct-08 3:33 
GeneralRe: Conflciting in strong name assembly Pin
J4amieC27-Oct-08 6:22
J4amieC27-Oct-08 6:22 
GeneralRe: Conflciting in strong name assembly Pin
George_George30-Oct-08 3:33
George_George30-Oct-08 3:33 
GeneralRe: Conflciting in strong name assembly Pin
George_George30-Oct-08 3:32
George_George30-Oct-08 3:32 
GeneralRe: Conflciting in strong name assembly Pin
Mark Salsbery30-Oct-08 5:20
Mark Salsbery30-Oct-08 5:20 
GeneralRe: Conflciting in strong name assembly Pin
George_George31-Oct-08 1:08
George_George31-Oct-08 1:08 
QuestionSelect all Text in TextBox and Set cursor to Start Pin
StyleGuide27-Oct-08 0:08
StyleGuide27-Oct-08 0:08 
AnswerRe: Select all Text in TextBox and Set cursor to Start Pin
#realJSOP27-Oct-08 1:16
professional#realJSOP27-Oct-08 1:16 
GeneralRe: Select all Text in TextBox and Set cursor to Start Pin
StyleGuide27-Oct-08 1:35
StyleGuide27-Oct-08 1:35 
GeneralRe: Select all Text in TextBox and Set cursor to Start Pin
DaveyM6927-Oct-08 2:26
professionalDaveyM6927-Oct-08 2:26 
GeneralRe: Select all Text in TextBox and Set cursor to Start Pin
StyleGuide27-Oct-08 3:09
StyleGuide27-Oct-08 3:09 
GeneralRe: Select all Text in TextBox and Set cursor to Start Pin
DaveyM696-Nov-08 14:03
professionalDaveyM696-Nov-08 14:03 
GeneralRe: Select all Text in TextBox and Set cursor to Start Pin
#realJSOP27-Oct-08 2:40
professional#realJSOP27-Oct-08 2:40 
GeneralRe: Select all Text in TextBox and Set cursor to Start Pin
StyleGuide27-Oct-08 3:10
StyleGuide27-Oct-08 3:10 
QuestionHow to retrieve sql database tables from the server for web application Pin
anithagaraga26-Oct-08 23:24
anithagaraga26-Oct-08 23:24 
AnswerRe: How to retrieve sql database tables from the server for web application Pin
Eddy Vluggen27-Oct-08 1:31
professionalEddy Vluggen27-Oct-08 1:31 
GeneralRe: How to retrieve sql database tables from the server for web application Pin
anithagaraga28-Oct-08 20:53
anithagaraga28-Oct-08 20:53 
Questionget/set properties with arrays Pin
Dewald26-Oct-08 22:40
Dewald26-Oct-08 22:40 
AnswerRe: get/set properties with arrays Pin
leppie26-Oct-08 22:45
leppie26-Oct-08 22:45 
GeneralRe: get/set properties with arrays Pin
Nagy Vilmos27-Oct-08 3:20
professionalNagy Vilmos27-Oct-08 3:20 
GeneralRe: get/set properties with arrays Pin
Dewald27-Oct-08 3:41
Dewald27-Oct-08 3:41 
williamnw wrote:
To follow on, you would be better to use methods to access the elements rather then the array


Why is that? To me it just seems more unwieldy. Here's an example why I think so:

Let's say you I have two instances of the above class and I want to set the value in one instance to be one bigger than the corresponding value in the other instance.

Using the methods as you recommend it would look like this:
MyFirstInstance.setItem(i, MySecondInstance.getItem(i)+1);
whereas, if using the get/set properties, it would look like this:
MyFirstInstance.MyArray[i] = MySecondInstance.MyArray[i]+1;

Both work, but to me the second line is just much more readable. Also, if I use the methods as suggested, I don't have access to MyArray.Length or any of the member methods of System.Array unless I explicitly code them.

What am I missing?
GeneralRe: get/set properties with arrays Pin
Nagy Vilmos27-Oct-08 4:34
professionalNagy Vilmos27-Oct-08 4:34 
GeneralRe: get/set properties with arrays Pin
Dewald27-Oct-08 3:30
Dewald27-Oct-08 3:30 

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.