Showing articles with C Sharp. Show all articles
In this blog we create a program which show the week name after the specific days. In this program we take input from user in number of days and then show the date and week day name by adding that days in current date.
A struct type is a value type that is typically used to encapsulate small groups of related variables such as the coordinates of rectangle and all.They are basically for light weighted objects. Unlike class, structs in C# are value type than reference type. It is useful if you have data that is not intended to be modified after creation of struct.
Inheritance is pretty much a crucial concepts for all the OOP languages and it is so for C Sharp. Inheritance allows us to define a class baes on another class. Basically inheriting features in one class from another.
Most of the C# operators can be overloaded which means they can be redefined for custom actions. To do various operations by a single operator, it can be done with the help of operator overloading.
In C# static is something which can not be instantiated. It is a modifier which can be applicable to many things such as classes, methods, variables and constructors. When a member is declared static, it can be accessed with the name of its class directly.
The working of this program will have several functions and methods. Once it gets the input from the user it will compare the input with the input generated by the system. This system generated input will be random, so that out of rock, paper and scissor it can give any one of them.