In Main function another function is there and to that
function if we pass string as parameter ,then that string
value is passed by value or reference type?
Answer Posted / parmjit
even if string is a reference type, whenever we pass it to
another function, it is passed as refrence-value to that
function function.
If the actual parameter is a string constant using this
refrence the called function cannot change the passed
string, because strings are constant values cannot be
modified.
If the actual parameter is a variable holding a referance
to a string object, even the the called function neither
change the passed string value nor change the referance
stored in the original passed parameter.
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
Describe how a .net application is compiled and executed
What are the types of operator?
What is thread safe in c#?
When To use HashTable In C#
What is Implicit conversion in C#?
When should we use sealed class in c#?
Can private virtual methods be overridden in c#.net?
What is asynchronous one-way calls?
What is view state c#?
What is datetime minvalue in c#?
Can I do things in il that I can't do in c#?
What is the difference between a class and an object c#?
What is the difference between writeline and write in c#?
Will the following code compile and run?
What is jit? What are the different types of jit?