[Mono-list] Question about C#
BioChem333
biochem333@nyc.rr.com
10 Sep 2002 01:59:23 -0400
Hi,
You can use a struct instead of a class to get pass by value, which
ensures that the object is always copied on assignment. If you want to
pass the object by reference, you'll have to use ref or out. All "value
types" are automatically sealed, so you won't be able to inherit from
them (you might also want to keep in mind that they're all stored on the
stack instead of on the heap like other objects).
Rich
On Mon, 2002-09-09 at 23:49, Ricardo Kirkner wrote:
> I think it is really nice if you can do something like
>
> obj1 = obj2;
>
> instead of
>
> obj1 = new ObjectType(obj2);