[Mono-list] C# Functionality

David Waite dwaite@gmail.com
Thu, 22 Jul 2004 23:05:26 -0600


C# has operator overloading, although some care must be taken as these
operators are different functions with different rules than things
like IComparer and Object.Equals().

C# does not have friend functions; it instead has the idea of an
'internal' access, where just the executable or library being built
has access, allowing you to still restrict third parties from
accessing certain features of your objects.

-David Waite

----- Original Message -----
From: Rohit K Gupta <rohitsmailbox@hotmail.com>
Date: Fri, 23 Jul 2004 09:44:43 +0530
Subject: [Mono-list] C# Functionality
To: MONO <mono-list@lists.ximian.com>


Hi to all,
 
i was wondering about the fact that 
as C++ provides for Operator Overloading and Friend Functions
,does C# Provide such functionality?
Operator overloading is as its name implies
    we can define operator functionalities for user defined classes
 
and friend functions are those which can be defined outside the class
but declared friend to the user defined class so that it can access
private memebers of the class.
 
now  by friend where i am confused  is 
in C# we can define friend classes, members and  functions but those
are part of class and can be accessed in same assembly only by making
the instace of the class
whereas  the c++ friend function can be called without instace of
object but just by passing it in arguments
 
 
this blurs my c++ concepts
am i thinking right or worng?
just help me
 
Thanks & Regards
Rohit