Friday, 16 November 2012

Partial Classes

0 comments Posted by Unknown at 08:44

Partial Classes

The partial keyword allows the class, struct, or interface to span across multiple files. Typically, a class will reside entirely in a single file. However, in situations where multiple developers need access to the same class, or more likely in the situation where a code generator of some type is generating part of a class, then having the class in multiple files can be beneficial.
The way that the partial keyword is used is to simply place partial before class, struct, or interface. In the following example the class TheBigClass resides in two separate source files, BigClassPart1.cs and BigClassPart2.cs:
Read More »

Classes and Structs

0 comments Posted by Unknown at 08:39

Classes and Structs

Classes and structs are essentially templates from which you can create objects. Each object contains data and has methods to manipulate and access that data. The class defines what data and functionality each particular object (called an instance) of that class can contain. For example, if you have a class that represents a customer, it might define fields such as CustomerID, FirstName, LastName, and Address, which you will use to hold information about a particular customer. It might also define functionality that acts upon the data stored in these fields. You can then instantiate an object of this class to represent one specific customer, set the field values for that instance, and use its functionality.

class PhoneCustomer
{
   public const string DayOfSendingBill = "Monday";
   public int CustomerID;
   public string FirstName;
   public string LastName;
}
Read More »

OOPS the Basic Funda

0 comments Posted by Unknown at 08:20
Object -oriented programming is a programming approach  to promote greater flexibility and maintainability in programming . Various oops concept that makes programming easier in all languages include inheritance and polymorphism .

The oops paradigm involves grouping of data and functions into modular entites knows as objects .You can group more than one objects having similar attributes in program using the class concept . Classes are user -defined data types that contain objects of similar types . Object are instances of a class. You can create any number of objects of  a class.  
Read More »
 

Popular Posts

Recent Comments

© 2011. All Rights Reserved | Object Orienred Programming | Template by Blogger Widgets

Home | About | Top ▲