Pass structure as an argument in c# method
Posted
by
MegaMind
on Programmers
See other posts from Programmers
or by MegaMind
Published on 2012-12-06T11:36:04Z
Indexed on
2012/12/06
17:21 UTC
Read the original article
Hit count: 177
I want to know if it is possible to pass a Structure as a parameter in c# method and if possible, is it a good practice to do so?
I have a c# method which is taking six arguments, i really hate that. I could create a carrier class for that and pass it as an argument, but i want to know if structure could do the job.
I want to mention here that few arguments to that method are of ref type and few are of value type.
© Programmers or respective owner