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

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

740


Explain how do you debug an asp.net web application?

647


How big is a 64 bit integer?

654


Explain the use of virtual, sealed, override, and abstract method?

638


How to sort an int array in c#?

710






Explain about Serialize and MarshalByRef?

695


Does c# support multiple inheritance (mi)?

694


What is Event - Delegate?

764


How to transpose multi-dimensional array?

736


What is the use of console readkey in c#?

651


What is the difference between private and protected in c#?

652


What are c# i/o classes? What are the commonly used i/o classes?

680


What is the use of static members with example using c#.net.

662


What is regex replace in c#?

693


Why do we use class in c#?

669