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

Can you use all access modifiers for all types?

0 Answers  


What is default c#?

0 Answers  


I was trying to use an out int parameter in one of my functions. How should I declare the variable that I am passing to it?

0 Answers  


List some of the classes used by system.data namespace?

0 Answers  


Explain the difference between “system.array.clone()” and “system.array.copyto()” in c#?

0 Answers  


Can we create multiple constructors?

0 Answers  


What is the difference between interface and abstract class ?

2 Answers   Basware, BITS,


In languages without exception-handling facilities, we could send an error-handling procedure as a parameter to each procedure that can detect errors that must be handled. What disadvantages are there to this method?

0 Answers   HCL,


Why is .net so popular?

0 Answers  


What are the string functions in c#?

0 Answers  


Difference between imperative and interrogative code?

1 Answers   VelTech, Wipro,


Distinguish between continue and break statement?

0 Answers  


Categories