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
harish reddy
NA
162
33.4k
Method invoking
Jan 29 2018 12:15 AM
Sir,
I am not understanding the below code of method. pls explain.
static void PrintNumber(int numberParam)
{
// Modifying the primitive-type parameter
numberParam = 5;
Console.WriteLine("in PrintNumber() method, after " +
"modification, numberParam is: {0}", numberParam);
}
Invocation of the method from Main():
static void Main()
{
int numberArg = 3;
// Copying the value 3 of the argument numberArg to the
// parameter numberParam
PrintNumber(numberArg);
Console.WriteLine("in the Main() method numberArg is: " +
numberArg);
}
The result from the above line is printed below:
in PrintNumber() method, after modification, numberParam is: 5
in the Main() method numberArg is: 3
1. Pls explain what is method declaration, invocation, argument in simple words.
Reply
Answers (
3
)
How to get id from other table and insert in other table
web.sitemap error