Assigning a reference to a variable

  • Thread starter Thread starter Jon
  • Start date Start date
Hi Jon,

Have you reviewed all the replies to you? Do they make sense to you? If you
still need any help, please feel free to feedback, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
 
Thanks once again for the replies and advice. I been doing some non-software work for two weeks, and
am now returning to the problem.

I've decided to restructure things and to send the value within the struct to a function

if(???) func(ref set.left, ...);
else if(???) func(ref set.right, ...);
else func(ref set.centre, ...);

Jon
 
Jon said:
Thanks once again for the replies and advice. I been doing some
non-software work for two weeks, and
am now returning to the problem.

I've decided to restructure things and to send the value within the
struct to a function

if(???) func(ref set.left, ...);
else if(???) func(ref set.right, ...);
else func(ref set.centre, ...);

I know that you received solid advice that makes for a cleaner design,
for instance, using classes and delegates.

Why do you persist in this approach.
If your brain still thinks in C instead of C#, it's time to get a new
brain.
 
Someone mentioned changing the struct to a class, but when I gave more details of my problem (reply
to Peter Doniho dated 29 November 2007 08:40 - I'm from the UK, so time may be different elsewhere)
no one mentioned classes again. I don't see how changing to a class would help.

Delegates: Peter Doniho suggested this (reply dated 29 November 2007 18:02). I considered this, but
by re-arranging things and putting more into a function, it looked cleaner to me.




Jon said:
Thanks once again for the replies and advice. I been doing some
non-software work for two weeks, and
am now returning to the problem.

I've decided to restructure things and to send the value within the
struct to a function

if(???) func(ref set.left, ...);
else if(???) func(ref set.right, ...);
else func(ref set.centre, ...);

I know that you received solid advice that makes for a cleaner design,
for instance, using classes and delegates.

Why do you persist in this approach.
If your brain still thinks in C instead of C#, it's time to get a new
brain.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top