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
Why c# is called type safe language?
What is clr in c#?
What are the three types of predicates?
What is object type in c#?
Can constructor be protected?
Does c# have primitives?
What is the meaning of MSIL?
Can abstract class instantiated c#?
When can a derived class override a base class member?
Why do we need structs in c#?
Write a program to find the angle between the hours and minutes in a clock
What is difference between write and writeline in c#?
Why singleton is sealed?
What is datasource c#?
Is string a primitive data type in c#?