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
Maha
NA
600
70.8k
Whether it is possible
Dec 3 2014 8:29 AM
http://www.c-sharpcorner.com/Forums/Thread/277334/constructor-body.aspx
I wish to know whether it is possible to do in the following program the way code is highlighted in the above web page. Problem is coloured.
using System;
public class CreateEmployee
{
public static void Main()
{
int id = 345;
Employee myAssistant = new Employee(id);
Console.WriteLine("ID # is {0}", myAssistant.GetId());
Console.ReadKey();
}
}
internal class Employee
{
private int idNumber;
public Employee(Employee myA)
{
idNumber = myA.idNumber;
}
public int GetId()
{
return idNumber;
}
}
// ID # is 345
Reply
Answers (
9
)
mouse double click in listview?
Passing image from C# to Matlab