TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Aman Jen
NA
141
40.8k
Call by Reference And Call by value
Oct 1 2013 6:02 AM
Hi,Plz have luk @Below code:- plz explain me .....whether its call by Call by Reference
Or
Call by value
class Program
{
public static void Input(string C)
{
C= "ABCD";
Console.WriteLine(C);
}
static void Main(string[] args)
{
string B = "EFGH";
Program.Input(B);
Console.ReadKey();
}
}
Output : ABCD
1)Looking at the example it shows its call by value becoz , if we use call by refrence then we have to use
ref
keyword which is not in this case so its call by value according me.
2)But then, if it is call by value it should print "EFGH", but rather its printing "ABCD" of input method .
Why plz explain..
Thnx in Advance
Reply
Answers (
4
)
TextBox output please ?
Renaming As YYYY.MM.DD.001.JPG and Moving to YYYY.MM.DD