Click here to Skip to main content
12,406,342 members (68,120 online)
   

C#

 
QuestionC# app.config permission Pin
classy_dog29-Jan-13 19:11
memberclassy_dog29-Jan-13 19:11 
AnswerRe: C# app.config permission Pin
Richard MacCutchan29-Jan-13 21:15
mvpRichard MacCutchan29-Jan-13 21:15 
AnswerRe: C# app.config permission Pin
LokoLuke30-Jan-13 0:35
memberLokoLuke30-Jan-13 0:35 
AnswerRe: C# app.config permission Pin
Shameel30-Jan-13 3:22
memberShameel30-Jan-13 3:22 
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){
         x=thatPop.x;
       }
       public int x;
};
class GA{
public GA(){
       InitPop=new Population();
       CrossOverPop=new Population();
}
public Population FindPopID(int ID){
       switch(ID){
         case 1:return InitalPop;break;
	 case 2:return CrossOverPop;break;
	 default:break;
       }
       return InitialPop;//default
}
public void DuplicatePopulation(int FromID,int ToID){
	Population FROM,TO;
	FROM=FindPopID(FromID);
	TO=FindPopID(ToID);		         
        TO.DuplicatePopulation(FROM);
}
Population InitialPop,CrossOverPop;
};
 
class MainClass{
public void main(string[] args){
        GA GeneticAl=new GA();
        
        //Process here

        GeneticAl.DuplicatePopulation(1,2);
};
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 
AnswerRe: Dynamic Reference to Dll Path Pin
jschell29-Jan-13 13:50
memberjschell29-Jan-13 13:50 
Question.NET Brush serialization/WYSIWIG [Solved] Pin
Amlanjyoti Saikia29-Jan-13 0:32
memberAmlanjyoti Saikia29-Jan-13 0:32 
AnswerRe: .NET Brush serialization/WYSIWIG Pin
Brisingr Aerowing29-Jan-13 3:12
memberBrisingr Aerowing29-Jan-13 3:12 
GeneralRe: .NET Brush serialization/WYSIWIG Pin
Amlanjyoti Saikia30-Jan-13 1:54
memberAmlanjyoti Saikia30-Jan-13 1:54 
Questionhow to check the avaialbility of username from database Pin
Santhosh V.T28-Jan-13 20:51
memberSanthosh V.T28-Jan-13 20:51 
AnswerRe: how to check the avaialbility of username from database Pin
OriginalGriff28-Jan-13 21:17
mvpOriginalGriff28-Jan-13 21:17 
AnswerRe: how to check the avaialbility of username from database Pin
PIEBALDconsult29-Jan-13 3:59
memberPIEBALDconsult29-Jan-13 3:59 
AnswerRe: how to check the avaialbility of username from database Pin
Marcus Kramer29-Jan-13 5:11
mvpMarcus Kramer29-Jan-13 5:11 
QuestionLearning C# .Net - From where to start.? Pin
mbatra3128-Jan-13 19:21
membermbatra3128-Jan-13 19:21 
AnswerRe: Learning C# .Net - From where to start.? Pin
OriginalGriff28-Jan-13 21:23
mvpOriginalGriff28-Jan-13 21:23 
AnswerRe: Learning C# .Net - From where to start.? Pin
Richard MacCutchan28-Jan-13 22:53
mvpRichard MacCutchan28-Jan-13 22:53 

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
Web02 | 2.8.160730.1 | Last Updated 30 Jul 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid