differences between C++ and C# -


I know C ++ but I'm new to C # programming, and I have a few questions:

  1. 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 that f () will not change my stack?

  2. Automatic in each class in C ++ operator = , copy ctor and dtor Made by the form, C # also does this?

  3. I know that in C #, if we have a method f (stack skaack) , then it's f (stack & Stk) in in C ++, so how do I send the object parameter from the value?

  4. In C #, we also create two files: .h for announcements and < / P>

    (thanks!)

    1. 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.

    2. class not for types, because they can not be assigned directly class type always handled through an indicator, the object does not directly manipulate only struct can be manipulated directly, and they are always specified through memory copy, so they have no assignment Operator or district.

    3. 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.

    4. No, the metadata is stored in the assembly only.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -