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
What is global namespace in c#?
Can you mark static constructor with access modifiers?
How will you deploy the dll file in gac?
Is c# and c same?
what is be the overhead, if i use binary transmission. and will it be sent using xml text or how ?
Can we set image Source dynamically using C# in WPF application?
What is an xsd file?
Can a dictionary have the same key?
Can you instantiate a struct without using a new operator in c#?
What is entity framework c#?
What is ildasm and obfuscator in net?
What is semaphore in c#?
What is IL / CIL / MSIL?
What is thread pooling?
Can int be null c#?