Click here to Skip to main content
13,003,094 members (65,482 online)


GeneralRe: C# app.config permission Pin
jschell30-Jan-13 8:07
memberjschell30-Jan-13 8:07 
QuestionC# linq to sql error Pin
classy_dog29-Jan-13 19:10
memberclassy_dog29-Jan-13 19:10 
AnswerRe: C# linq to sql error Pin
Richard MacCutchan29-Jan-13 21:13
mvpRichard MacCutchan29-Jan-13 21:13 
QuestionReference confusion Pin
yudhistira dewanata29-Jan-13 18:57
memberyudhistira dewanata29-Jan-13 18:57 
I've just started learning C# yesterday, and I'm really confused with the reference system.
Can anyone please help explain to me what would happen here:
class Population{
       public void DuplicatePopulation(Population thatPop){
       public int x;
class GA{
public GA(){
       InitPop=new Population();
       CrossOverPop=new Population();
public Population FindPopID(int ID){
         case 1:return InitalPop;break;
	 case 2:return CrossOverPop;break;
       return InitialPop;//default
public void DuplicatePopulation(int FromID,int ToID){
	Population FROM,TO;
Population InitialPop,CrossOverPop;
class MainClass{
public void main(string[] args){
        GA GeneticAl=new GA();
        //Process here

What I'm trying to do is duplicate population Init to Population CO. With this code, will the value of CrossOverPop.x == InitPop.x
Am I already passing by reference? or did i need to use the ref keyword?
AnswerRe: Reference confusion Pin
Abhinav S29-Jan-13 19:01
mvpAbhinav S29-Jan-13 19:01 
GeneralRe: Reference confusion Pin
Shameel30-Jan-13 3:26
memberShameel30-Jan-13 3:26 
QuestionSerial Port Errors, User Messages Pin
C-P-User-329-Jan-13 6:23
memberC-P-User-329-Jan-13 6:23 
AnswerRe: Serial Port Errors, User Messages Pin
jibesh29-Jan-13 11:57
memberjibesh29-Jan-13 11:57 
QuestionDynamic Reference to Dll Path Pin
Member 461637929-Jan-13 1:53
memberMember 461637929-Jan-13 1:53 
AnswerRe: Dynamic Reference to Dll Path Pin
Alan N29-Jan-13 3:29
memberAlan N29-Jan-13 3:29 

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.

Advertise | Privacy | Mobile
Web01 | 2.8.170626.1 | Last Updated 25 Jun 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid