Click here to Skip to main content
15,922,145 members
Home / Discussions / C#
   

C#

 
GeneralRe: developing Client / Server application C#: Create code Client 2 ? Pin
hajajj 27-Aug-13 12:57
hajajj 27-Aug-13 12:57 
GeneralRe: developing Client / Server application C#: Create code Client 2 ? Pin
Pete O'Hanlon7-Aug-13 13:49
mvePete O'Hanlon7-Aug-13 13:49 
GeneralRe: developing Client / Server application C#: Create code Client 2 ? Pin
hajajj 28-Aug-13 0:45
hajajj 28-Aug-13 0:45 
GeneralRe: developing Client / Server application C#: Create code Client 2 ? Pin
Pete O'Hanlon8-Aug-13 0:54
mvePete O'Hanlon8-Aug-13 0:54 
GeneralRe: developing Client / Server application C#: Create code Client 2 ? Pin
Simon_Whale8-Aug-13 1:42
Simon_Whale8-Aug-13 1:42 
GeneralRe: developing Client / Server application C#: Create code Client 2 ? Pin
hajajj 28-Aug-13 1:49
hajajj 28-Aug-13 1:49 
QuestionRe: developing Client / Server application C#: Create code Client 2 ? Pin
Eddy Vluggen8-Aug-13 9:12
professionalEddy Vluggen8-Aug-13 9:12 
GeneralRe: developing Client / Server application C#: Create code Client 2 ? Pin
Jean A Brandelero8-Aug-13 10:41
Jean A Brandelero8-Aug-13 10:41 
QuestionHow to Pop mails From Mail to biztalk then save it in database Pin
Ahmed Abdelnasser7-Aug-13 2:17
Ahmed Abdelnasser7-Aug-13 2:17 
AnswerRe: How to Pop mails From Mail to biztalk then save it in database Pin
Simon_Whale7-Aug-13 3:29
Simon_Whale7-Aug-13 3:29 
QuestionWant to create a websocket server in c# Pin
Member 101935636-Aug-13 18:50
Member 101935636-Aug-13 18:50 
AnswerRe: Want to create a websocket server in c# Pin
Abhinav S6-Aug-13 19:47
Abhinav S6-Aug-13 19:47 
QuestionConcatenating 2 columns into one (radgrid) Pin
Member 101936536-Aug-13 9:59
Member 101936536-Aug-13 9:59 
AnswerRe: Concatenating 2 columns into one (radgrid) Pin
Mycroft Holmes6-Aug-13 13:00
professionalMycroft Holmes6-Aug-13 13:00 
QuestionObjects created in a loop - definition name Pin
DSLoginYea6-Aug-13 2:02
DSLoginYea6-Aug-13 2:02 
AnswerRe: Objects created in a loop - definition name Pin
Dave Kreskowiak6-Aug-13 2:47
mveDave Kreskowiak6-Aug-13 2:47 
AnswerRe: Objects created in a loop - definition name Pin
Clifford Nelson6-Aug-13 8:36
Clifford Nelson6-Aug-13 8:36 
GeneralRe: Objects created in a loop - definition name Pin
DSLoginYea6-Aug-13 9:28
DSLoginYea6-Aug-13 9:28 
Well - ok. Either there is no name for it, or people would rather talk around it. I am hoping there is no name for it - as I wouldn't think people would just want to talk around giving an answer on here.

Specific question : Is there a special name for objects created in a loop - while all have the same name. Because, normally 2 objects with the same name are not allowed in the same scope.

For example - you get an error at compile time, if you try to name 2 objects the same name.

Code:

TestA a = new TestA();
TestA a = new TestA();

Result: "A local variable named a is already defined in this scope"


However, that is allowed in a loop - like in my original question. I have modified my code below - the 10 objects of type TestA are all named "a". They will still remain in scope (and not ready garbage collection) after the loop that created them has finished.


ArrayList anArrayList = new ArrayList();


for (int i = 0; i < 10; i++)
{
TestA a = new TestA();
anArrayList.Add(a);
}

Is there a name for this : Creating multiple objects with the same name as a reference for them.
GeneralRe: Objects created in a loop - definition name Pin
nick.j.s6-Aug-13 10:51
nick.j.s6-Aug-13 10:51 
GeneralRe: Objects created in a loop - definition name Pin
DSLoginYea6-Aug-13 10:55
DSLoginYea6-Aug-13 10:55 
GeneralRe: Objects created in a loop - definition name Pin
Dave Kreskowiak6-Aug-13 10:59
mveDave Kreskowiak6-Aug-13 10:59 
GeneralRe: Objects created in a loop - definition name Pin
Dave Kreskowiak6-Aug-13 10:59
mveDave Kreskowiak6-Aug-13 10:59 
AnswerRe: Objects created in a loop - definition name Pin
Jean A Brandelero8-Aug-13 10:43
Jean A Brandelero8-Aug-13 10:43 
QuestionWah Wah effect for guitar Pin
paulera6-Aug-13 1:52
paulera6-Aug-13 1:52 
AnswerRe: Wah Wah effect for guitar Pin
Ravi Bhavnani6-Aug-13 6:02
professionalRavi Bhavnani6-Aug-13 6:02 

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.