Hello World! I'm talking about object-oriented programming in C#. I've started a new program and from the menu I'm going to select project, Add class and I'm going to create a fraction class. Give it the name and then click add. And we get framework and we can put our code here. The first thing I want to do is declare two integers that will be member attributes, or properties of this class. I've made them private, so that you can't set the denominator to zero. You're going to have to use one of the methods of the class to assign a value to the denominator. That way we can make sure that it is never zero. A constructor is a method that has the same name as the class. This is the base constructor with no arguments, and I set numerator to zero, and denominator to one. That's equivalent to zero without letting the denominator be zero. I've added a second constructor that has parameters integer numerator and integer denominator. No matter what the numerator is with the lowercase, I'm going to assign it as the value for this member attribute of my class. Notice I'm using uppercase here, and lowercase here. If the denominator is not equal to zero, then I accept it, and assignment it as the value before the Denominator. Otherwise [this should be capital D] this is given a value of 1. I could use this one, and say... Fraction half equals new fraction one comma two. I could use this constructor and just say fraction myFrac equals new fraction with no arguments, and I would get the numerator zero, and the denominator is one. The ToString method is automatically a member of every class and it simply returns the name of the class. But, what I would like to do, for my fraction class is return the numerator a slash and the denominator . In order to write my own version of the ToString method, I need to use the word override and this function method returns a string. Oh, I'm missing a plus sign here. There we go. Okay, let's try this now in my form. and in form load I'm going to create a new instance of the fraction and name it myFrac. equals new Fraction and if I give it no arguments Ah... text (of the form) equals myFrac dot .to string method. And if we run that you can see that the fraction we created is 0 slash 1 with the ToString method. Let's change this to new fraction 1, 2 And run that. And this time we have 1/2 And let's try giving a zero as the denominator and you can see it did not accept the zero, It just made 1/1 And that's it for now.