If a class is a ref type, how we can pass to a function.



If a class is a ref type, how we can pass to a function...

Answer / sujai cn

We can pass the object to a function by pass by reference
type.
create an object and pass that object to the function.
when we pass the object to function a copy constructor is
used to create a bit wise copy of the object sent to the
function.If there is no copy constructor implemented the
default copy constructor is called.

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More C Sharp Interview Questions

How do you implement Inheritance in dot net ?

5 Answers   MMTS, Sea Energy,


If the interface in c# only contains the declaration of the methods and we need to define those methods in the class, then why we use the interface?

0 Answers   HCL,


Why hashtable is thread safe in c#?

0 Answers  


Difference between C++ and C#.net

19 Answers   Google, TCS, Wipro,


What are controls in c#?

0 Answers  






Can you store different types in an array in c#?

0 Answers  


What is multiple interface in c#?

0 Answers  


Which control cannot be placed in mdi?

0 Answers  


What is readline c#?

0 Answers  


can you declare an override method to be static if the original method is not static?

0 Answers   Siebel Systems,


Can you override private virtual methods?

11 Answers   AROBS Transilvania Software, IBM, Mind Tree, Revalsys,


What is strong data type in c#?

0 Answers  


Categories