AllInWorld99 provides a reference manual covering many aspects of web programming, including technologies such as HTML, XHTML, CSS, XML, JavaScript, PHP, ASP, SQL,FLASH, jQuery, java, for loop, switch case, if, if else, for...of, for...in, for...each,while loop, blogger tips, blogger meta tag generator, blogger tricks, blogger pagination, client side script, html code editor, javascript editor with instant output, css editor, online html editor, materialize css tutorial, materialize css dropdown list,break, continue statement, label,array, json, get day and month dropdown list using c# code, CSS button,protect cd or pendrive from virus, cordova, android example, html and css to make android app, html code play,telerik show hide column, Transparent image convertor, copy to clipboard using javascript without using any swf file, simple animation using css, SQL etc. AllInWorld99 presents thousands of code examples (accompanied with source code) which can be copied/downloaded independantly. By using the online editor provided,readers can edit the examples and execute the code experimentally.


Simple Types (Primitive Data types)

   Simple or value type variables are those, which are assigned space in the stack instead of
the heap. All the primitive types such as int, double etc are value type variables. The
simple types basically consist of Boolean and Numeric types, where Numeric is further
divided into Integral and Floating Point.
The first rule of value types is that they cannot be null. Anytime you declare a variable of
value type, you have allocated the number of bytes associated with that type on the stack
and are working directly with that allocated array of bits. In addition, when you pass a
variable of value type, you are passing that variable’s value and not a reference to the
underlying object.

Object Type

Object type or reference type variables are those, which are allocated storage space in the
heap. Reference type objects can be null. When a reference type is allocated under the
covers a value is allocated on the heap and a reference to that value is returned. There are
basically four reference types: classes, interfaces, delegates and arrays.

Class Type

Custom data types are available in .NET framework in the form of classes or class type. It
is nothing but a set of data and related behavior that is defined by the developer.
Object type and class type are both reference type variables. The only difference comes
from the fact that object type consists of objects predefined and available with the .NET
framework such as string whereas class type consists of custom user defined data types
such as the class employee given below.

Example:-


 class employee
{
  int empid;
  string empname;
  public employee()
  {
     empid = 10;
     empname = “Reshmi”;
   }
}




Advertisement

0 comments:

Post a Comment

Total Pageviews