Re: Reference Types and Value Types
"Jon Skeet [C# MVP]" <skeet@pobox.co m> wrote in message
news:MPG.1bd464 edd50b448798b65 2@msnews.micros oft.com...[color=blue]
> Champika Nirosh <test@test.lk > wrote:[color=green]
> > I think it is not a fair comment...
> >
> > "Everything is passed by value by default"[/color]
>
> It's a true comment. The only things which can be passed are value
> types and references. Both of those are passed by value by default.
>[/color]
10: Very correct here you made the coment saying "only things which can be
passed are value
types and references. " it was not their earlier..
[color=blue][color=green]
> > Instead.. What you would said is.. reference of the reference type[/color][/color]
variable[color=blue][color=green]
> > is passed by its' value.. or object references are passed by value by
> > default..[/color]
>
> But that's all that *can* be passed. Note that it's not the reference
> of the reference type variable - it's the *value* of a reference type
> variable, and that value is a reference.
>[/color]
Do you see any difference, when u take the whole sentence..??
[color=blue][color=green]
> > You statement is misleading... One might take it as .. object also[/color][/color]
passed by[color=blue][color=green]
> > its' value.. what happen actaully is since reference type cannot passed[/color][/color]
by[color=blue][color=green]
> > value even though you try they passes their reference..[/color]
>
> If that's all I'd said, you'd be right. However, look at what I *did*
> say:
>
> <quote>
> Not true. Everything is passed by value by default - whether the value
> is a struct or a reference. You can't pass an actual *object* either by
> reference or by value.
> </quote>
>
> Now, how can *that* be taken as "object also passed by its value"?
>[/color]
Goto 10 please.....
[color=blue]
> --
> Jon Skeet - <skeet@pobox.co m>
> http://www.pobox.com/~skeet
> If replying to the group, please do not mail me too[/color]
"Jon Skeet [C# MVP]" <skeet@pobox.co m> wrote in message
news:MPG.1bd464 edd50b448798b65 2@msnews.micros oft.com...[color=blue]
> Champika Nirosh <test@test.lk > wrote:[color=green]
> > I think it is not a fair comment...
> >
> > "Everything is passed by value by default"[/color]
>
> It's a true comment. The only things which can be passed are value
> types and references. Both of those are passed by value by default.
>[/color]
10: Very correct here you made the coment saying "only things which can be
passed are value
types and references. " it was not their earlier..
[color=blue][color=green]
> > Instead.. What you would said is.. reference of the reference type[/color][/color]
variable[color=blue][color=green]
> > is passed by its' value.. or object references are passed by value by
> > default..[/color]
>
> But that's all that *can* be passed. Note that it's not the reference
> of the reference type variable - it's the *value* of a reference type
> variable, and that value is a reference.
>[/color]
Do you see any difference, when u take the whole sentence..??
[color=blue][color=green]
> > You statement is misleading... One might take it as .. object also[/color][/color]
passed by[color=blue][color=green]
> > its' value.. what happen actaully is since reference type cannot passed[/color][/color]
by[color=blue][color=green]
> > value even though you try they passes their reference..[/color]
>
> If that's all I'd said, you'd be right. However, look at what I *did*
> say:
>
> <quote>
> Not true. Everything is passed by value by default - whether the value
> is a struct or a reference. You can't pass an actual *object* either by
> reference or by value.
> </quote>
>
> Now, how can *that* be taken as "object also passed by its value"?
>[/color]
Goto 10 please.....
[color=blue]
> --
> Jon Skeet - <skeet@pobox.co m>
> http://www.pobox.com/~skeet
> If replying to the group, please do not mail me too[/color]
Comment