63 034
Assignments Done
99,1%
Successfully Done
In July 2018

Answer to Question #4181 in C# for lalitkumar

Question #4181
Create a class library and define class 'User'. In user class define the public, protected and friend functions. Create a console application and add a reference to this library and call the user methods by creating the object. Which are the functions allowed to call here?
Expert's answer
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UserLibrary;

namespace Question4181
{
class Program
{
& static void Main(string[] args)
& {
User newUser = new User();
Console.WriteLine(newUser.getName());
& }
}
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UserLibrary
{
public class User
{
& public User() { }
& public string getName(){
return "Name";
& }
& protected string Surname(){
return "Surname";
& }
&

}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions