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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the steps to create satellite assembly?

693


What are destructors in C#?

1162


Is there any sample c# code for simple threading?

734


What is difference between assembly and dll?

730


What do you understand by an Implicit Variable?

744


how dot net compiled code will become platform independent?

739


What are the Types of caching

769


What is static classes?

703


What is the difference between abstract and abstraction?

661


Value Type and Reference Type Data type in C#?

731


How does inheritance work in c#?

850


Difference between a sub and a function in c#.

749


Can destructors have access modifiers?

754


What is lazy loading and eager loading in c#?

682


What are the various components in crystal reports?

725