differences between C++ and C# -
I know C ++ but I'm new to C # programming, and I have a few questions:
-
I know that in C #, there is no "constipation", so how do you change it? If you call a method
f (stack skak)
, how do you ensure thatf ()
will not change my stack? -
Automatic in each class in C ++
operator =
,copy ctor
anddtor
Made by the form, C # also does this? -
I know that in C #, if we have a method
f (stack skaack)
, then it'sf (stack & Stk) in
in C ++, so how do I send the object parameter from the value? -
In C #, we also create two files:
.h
for announcements and< / P>
(thanks!)
-
Any of the arbitrary types The only personal field can be
read-only
, unchecked variables or type "constants" (const
) compile-time constants Like, like p. -
class
not for types, because they can not be assigned directlyclass
type always handled through an indicator, the object does not directly manipulate onlystruct
can be manipulated directly, and they are always specified through memory copy, so they have no assignment Operator or district. -
The class "object" type is always the indicator for the object, so to copy the class types of objects, they should be
iCloneable
needs to be executed, and you should call.one on the object ()
and pass it to copy the structure objects, you can pass them normally Are there. -
No, the metadata is stored in the assembly only.
-
Comments
Post a Comment