July 2017
Beginner
466 pages
9h 37m
English
Open your Visual Studio 2017 IDE, go to File | New | Project| Console App (.NET Framework) as the project template. Create the project by giving it a name (in this example, we are naming it ConsoleApp).
Now, create a class named Person and inherit it from the ICloneable interface (just for this demonstration). Implement the interface to generate a Clone() method, which will by default throw NotImplementedException. Leave it as it is; we are going to revisit this method later. Add few string properties named ID, Name, and Address. Here's the implementation of the class, for reference:
public class Person : ICloneable { public string ID { get; set; } public string Name { get; set; } public ...Read now
Unlock full access