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
Explain the working of serialization?
Is comparable a functional interface?
What are the Types of instancing properties and explain each. Explain the difference between multiuse,singleuse and globalmultiuse and which is default
What are controls in c#?
Can the accessibility of a type member be greater than the accessibility of its containing type?
Why should I use interface in c#?
What is the default value of datetime in c#?
Explain manifest & metadata in c#.
Is a valid int value?
What is serialization in unity?
how to prevent a class from being inherited in c#.net?
So what makes your code really object-oriented #?
Is there an equivalent of exit() for quitting a c# .net application?
What is a generic class?
What is a callback c#?