Click here to Skip to main content
15,905,782 members
Home / Discussions / C#
   

C#

 
AnswerRe: Why is main() in a class?(About oo design) Pin
Nader Elshehabi7-Sep-06 4:45
Nader Elshehabi7-Sep-06 4:45 
GeneralRe: Why is main() in a class?(About oo design) Pin
KevinMac7-Sep-06 8:55
KevinMac7-Sep-06 8:55 
AnswerRe: Why is main() in a class?(About oo design) Pin
Kevin McFarlane7-Sep-06 5:18
Kevin McFarlane7-Sep-06 5:18 
QuestionPassing char array to c++ function Pin
Blubbo7-Sep-06 3:13
Blubbo7-Sep-06 3:13 
QuestionRe: Passing char array to c++ function Pin
Nader Elshehabi7-Sep-06 4:48
Nader Elshehabi7-Sep-06 4:48 
AnswerRe: Passing char array to c++ function Pin
Judah Gabriel Himango7-Sep-06 4:57
sponsorJudah Gabriel Himango7-Sep-06 4:57 
AnswerRe: Passing char array to c++ function Pin
Judah Gabriel Himango7-Sep-06 4:57
sponsorJudah Gabriel Himango7-Sep-06 4:57 
QuestionQuestion about Objects Pin
Chrismaster7-Sep-06 2:08
Chrismaster7-Sep-06 2:08 
Hi!
I'm assuming little problems instancing a set of sprites from a single
AnimatedSprite class using SDLdotNet with C# 2005.

let's check my Generate() function in the Stone Class:

<br />
<br />
AnimatedSprite asMySprite;<br />
<br />
public void Generate(AnimatedSprite asfOrigin)<br />
{<br />
    int iRND = Random.Next(0, 5);<br />
    asMySprite = new AnimatedSprite();<br />
    asMySprite = asfOrigin;<br />
<br />
    switch(iRND)<br />
    {<br />
    case 0:<br />
        asMySprite.CurrentAnimation = "aaa";<br />
    case 1:<br />
        .<br />
        .<br />
        .<br />
        <br />


So now my problem is, that after calling the Generate()
function, if I change some properties of the asfOrigin
structure, they are also changed in my asMySprite
structure, regardless to the fact that I am instanciating
asMySprite with the new keyword prior to copying it's
changes.

What am I doing wrong???

Thanks for help in advance,
Chris
AnswerRe: Question about Objects Pin
SeMartens7-Sep-06 2:23
SeMartens7-Sep-06 2:23 
AnswerRe: Question about Objects Pin
Not Active7-Sep-06 2:25
mentorNot Active7-Sep-06 2:25 
AnswerRe: Question about Objects Pin
mikone7-Sep-06 2:26
mikone7-Sep-06 2:26 
AnswerThanks! Pin
Chrismaster7-Sep-06 2:34
Chrismaster7-Sep-06 2:34 
AnswerRe: Question about Objects Pin
guygo7-Sep-06 2:48
guygo7-Sep-06 2:48 
QuestionLimiting ListObjects in Excel from growing row-wise Pin
esskay19797-Sep-06 1:51
esskay19797-Sep-06 1:51 
QuestionAvoiding 2 same processes Pin
stancrm7-Sep-06 1:48
stancrm7-Sep-06 1:48 
AnswerRe: Avoiding 2 same processes Pin
User 66587-Sep-06 2:00
User 66587-Sep-06 2:00 
Questionframework including Pin
erfi7-Sep-06 1:17
erfi7-Sep-06 1:17 
AnswerRe: framework including Pin
Utkarshraj Atmaram7-Sep-06 1:55
Utkarshraj Atmaram7-Sep-06 1:55 
Questionhow to call a method from another thread? Pin
michal.kreslik7-Sep-06 0:44
michal.kreslik7-Sep-06 0:44 
AnswerRe: how to call a method from another thread? Pin
Bijesh7-Sep-06 0:53
Bijesh7-Sep-06 0:53 
GeneralRe: how to call a method from another thread? Pin
michal.kreslik7-Sep-06 1:57
michal.kreslik7-Sep-06 1:57 
QuestionWindows API overriding in C# Pin
hoangvantien7-Sep-06 0:39
hoangvantien7-Sep-06 0:39 
AnswerRe: Windows API overriding in C# Pin
Judah Gabriel Himango7-Sep-06 4:55
sponsorJudah Gabriel Himango7-Sep-06 4:55 
AnswerRe: Windows API overriding in C# Pin
Jun Du7-Sep-06 5:04
Jun Du7-Sep-06 5:04 
QuestionTreeView Control in WinForms Pin
aka21097-Sep-06 0:26
aka21097-Sep-06 0:26 

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.