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

What is the meaning of 0 in c#?

0 Answers  


Explain the process of inheriting a class into another class?

0 Answers  


How do destructors and garbage collection work in c#?

0 Answers  


What is an xsd file?

0 Answers  


What is a generic in c#?

0 Answers  






Explain ACID rule of thumb for transactions.

1 Answers  


What does it meant to say “the canonical” form of XML ?

1 Answers  


Okay, so an int is a value type, and a class is a reference type. How can int be derived from object?

0 Answers  


Can a constructor be private in c#?

0 Answers  


How do I create a multilanguage, single-file assembly?

0 Answers  


What is difference between dynamic and var in c#?

0 Answers  


How can I access the registry from c# code?

0 Answers  


Categories