You can read more about classes. I think what you really want to know is how to create a class.
Here's an example of a class:
public class Book
{
public string Title {get;set;}
public string Author {get;set;}
}
And here's how you can use it.
Book book1 = new Book();
book1.Title = "Harry Potter";
book1.Author = "J.K. Rowling";
Console.WriteLine("{0} by {1}", book1.Title, book1.Author);
This is how you can create a constructor for the class.
public class Book
{
//To create a constructor, you just create a method using the class name.
public Book(string title, string author)
{
this.Title = title;
this.Author = author;
}
//Creating a constructor with parameters eliminates the default
//constructor that's why you might want to add this if you want to
//instantiate the class without a parameters.
public Book() { }
public string Title {get;set;}
public string Author {get;set;}
}
With that constructor you can create an instance of your class by
Book book1 = new Book("Harry Potter", "J.K. Rowling");
Another way to do this is by using an initializers. This way you don't need to pass a constructor parameters to fill the values of your properties.
You might want to read this..
https://msdn.microsoft.com/en-us/library/x9afc042.aspx
Book book1 = new Book() { Title = "Harry Potter", Author = "J.K. Rowling" };