Maximizing.ASP.dot.NET.Real.World.ObjectOriented.Development [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Maximizing.ASP.dot.NET.Real.World.ObjectOriented.Development [Electronic resources] - نسخه متنی

Jeffrey Putz

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید






Classes and Objects


So what are classes and objects? A class is a piece of code that does something by manipulating its members. Members include methods and properties (other types of members exist, but they will be discussed later). Methods do something, and properties hold data.

An object is an instantiation of a class. An object is a living, breathing entity that does things. In our previous example, we have Customer objects that have properties, such as FirstName and LastName, and methods, such as Update() and Delete().

This is a somewhat abstract view of classes and objects. Developers like to know what the nuts and bolts are. Classes are compiled into assemblies. As you're probably aware from your beginning ASP.NET books and training, all of your pages are compiled into assemblies that are cached on the server. This compiled code will execute significantly faster than interpreted code, where the server must go through every line of code and figure out what to do every time the page executes.

Your classes are compiled as well and are stored in an assembly that has a .dll file extension. It's important to understand that any number of classes may "live" in an assembly. It doesn't matter what assembly your class lives in, as long as it's in the /bin folder of your application. Any class can be called by any other class in your application as long as it can be found in the /bin folder.


Actually, your classes can live in the machine's global assembly cache (GAC) as well, but for simplicity's sake, let's pretend for now that your compiled classes must live in the /bin folder.


/ 146