DEV Community

Tania
Tania

Posted on • Originally published at kodlogs.com

Natural Language Processing with python source code

#c

Today
we know about object and classes in our website kodlogs. C # is a powerful language which has been used for many years to create many important programs. But the problem is that as time went on, And the size of the program got bigger. Thus, managing files became very difficult and impossible. In 1980, Bjarne Stroustrup discussed this issue and made some additions to the C language. This addition was initially called C with classes. Was from the United States. Now let's talk about what objects are. The main feature or thing in programming is the concept of object. An object is a logical thing inside programming. It contains your personal data and code to work on that data. Now let's talk about classes. In order to create an object, it is necessary to first create its general form with the help of the keyword of the class. The class is very similar to the structure.Everything in C# is related with training and objects, alongside with its attributes and methods. For example: in actual life, a automobile is an object. The auto has attributes, such as weight and color, and methods, such as power and brake.See the following code example to understand more.


class Car 
{
  string color = "green ";

  static void Main(string[] args)
  {
    Car myObj = new Car();
    Console.WriteLine(myObj.color);
  }

              O/P
green

Enter fullscreen mode Exit fullscreen mode

Top comments (0)