[Mono-list] C# Functionality

Rohit K Gupta rohitsmailbox@hotmail.com
Fri, 23 Jul 2004 09:44:43 +0530


This is a multi-part message in MIME format.

------=_NextPart_000_002C_01C47099.AEC4B250
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi to all,

i was wondering about the fact that=20
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=20
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=20
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 
------=_NextPart_000_002C_01C47099.AEC4B250
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi to all,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>i was wondering about the fact that =
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>as C++ provides for Operator =
Overloading and Friend=20
Functions</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>,does C# Provide such =
functionality?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Operator overloading is as its name=20
implies</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; we can define =
operator=20
functionalities for user defined classes</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>and friend functions are those which =
can be defined=20
outside the class but declared friend to the user defined class so that =
it can=20
access private memebers of the class.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>now&nbsp; by&nbsp;friend where i am =
confused&nbsp;=20
is </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>in C# we can define friend classes, =
members and=20
&nbsp;functions but those are part of class and can be accessed in same =
assembly=20
only by making the instace of the class </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>whereas&nbsp; the c++ friend function =
can be called=20
without instace of object but just by passing it in =
arguments</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>this blurs my c++ concepts</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>am i thinking right or =
worng?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>just help me</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks &amp; Regards</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Rohit </FONT></DIV></BODY></HTML>

------=_NextPart_000_002C_01C47099.AEC4B250--