Monday, 21 January 2013

PHP Password Encryption And Decription


<?php
//Key
$key = 'secretkey';

//To Encrypt:
$encrypted = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, 'mukesh', MCRYPT_MODE_ECB);
echo $encrypted;
echo "<br>";
//To Decrypt:
$decrypted = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $encrypted, MCRYPT_MODE_ECB);
echo $decrypted;
?>

Country Name and codes in Select Box


<select 
class="PhoneCountryCode">
<option value="Afghanistan (+93)">Afghanistan (+93)</option>
<option value="Albania (+355)">Albania (+355)</option>
<option value="Algeria (+213)">Algeria (+213)</option>
<option value="American Samoa (+1)">American Samoa (+1)</option>
<option value="Andorra (+376)">Andorra (+376)</option>
<option value="Angola (+244)">Angola (+244)</option>
<option value="Anguilla (+1)">Anguilla (+1)</option>
<option value="Antigua (+1)">Antigua (+1)</option>
<option value="Argentina (+54)">Argentina (+54)</option>
<option value="Armenia (+374)">Armenia (+374)</option>
<option value="Aruba (+297)">Aruba (+297)</option>
<option value="Australia (+61)">Australia (+61)</option>
<option value="Austria (+43)">Austria (+43)</option>
<option value="Azerbaijan (+994)">Azerbaijan (+994)</option>
<option value="Bahrain (+973)">Bahrain (+973)</option>
<option value="Bangladesh (+880)">Bangladesh (+880)</option>
<option value="Barbados (+1)">Barbados (+1)</option>
<option value="Belarus (+375)">Belarus (+375)</option>
<option value="Belgium (+32)">Belgium (+32)</option>
<option value="Belize (+501)">Belize (+501)</option>
<option value="Benin (+229)">Benin (+229)</option>
<option value="Bermuda (+1)">Bermuda (+1)</option>
<option value="Bhutan (+975)">Bhutan (+975)</option>
<option value="Bolivia (+591)">Bolivia (+591)</option>
<option value="Bonaire, Sint Eustatius and Saba (+599)">Bonaire, Sint Eustatius and Saba (+599)</option>
<option value="Bosnia and Herzegovina (+387)">Bosnia and Herzegovina (+387)</option>
<option value="Botswana (+267)">Botswana (+267)</option>
<option value="Brazil (+55)">Brazil (+55)</option>
<option value="British Indian Ocean Territory (+246)">British Indian Ocean Territory (+246)</option>
<option value="British Virgin Islands (+1)">British Virgin Islands (+1)</option>
<option value="Brunei (+673)">Brunei (+673)</option>
<option value="Bulgaria (+359)">Bulgaria (+359)</option>
<option value="Burkina Faso (+226)">Burkina Faso (+226)</option>
<option value="Burundi (+257)">Burundi (+257)</option>
<option value="Cambodia (+855)">Cambodia (+855)</option>
<option value="Cameroon (+237)">Cameroon (+237)</option>
<option value="Canada (+1)">Canada (+1)</option>
<option value="Cape Verde (+238)">Cape Verde (+238)</option>
<option value="Cayman Islands (+1)">Cayman Islands (+1)</option>
<option value="Central African Republic (+236)">Central African Republic (+236)</option>
<option value="Chad (+235)">Chad (+235)</option>
<option value="Chile (+56)">Chile (+56)</option>
<option value="China (+86)">China (+86)</option>
<option value="Colombia (+57)">Colombia (+57)</option>
<option value="Comoros (+269)">Comoros (+269)</option>
<option value="Cook Islands (+682)">Cook Islands (+682)</option>
<option value="Costa Rica (+506)">Costa Rica (+506)</option>
<option value="Côte d'Ivoire (+225)">Côte d'Ivoire (+225)</option>
<option value="Croatia (+385)">Croatia (+385)</option>
<option value="Cuba (+53)">Cuba (+53)</option>
<option value="Curaçao (+599)">Curaçao (+599)</option>
<option value="Cyprus (+357)">Cyprus (+357)</option>
<option value="Czech Republic (+420)">Czech Republic (+420)</option>
<option value="Democratic Republic of the Congo (+243)">Democratic Republic of the Congo (+243)</option>
<option value="Denmark (+45)">Denmark (+45)</option>
<option value="Djibouti (+253)">Djibouti (+253)</option>
<option value="Dominica (+1)">Dominica (+1)</option>
<option value="Dominican Republic (+1)">Dominican Republic (+1)</option>
<option value="Ecuador (+593)">Ecuador (+593)</option>
<option value="Egypt (+20)">Egypt (+20)</option>
<option value="El Salvador (+503)">El Salvador (+503)</option>
<option value="Equatorial Guinea (+240)">Equatorial Guinea (+240)</option>
<option value="Eritrea (+291)">Eritrea (+291)</option>
<option value="Estonia (+372)">Estonia (+372)</option>
<option value="Ethiopia (+251)">Ethiopia (+251)</option>
<option value="Falkland Islands (+500)">Falkland Islands (+500)</option>
<option value="Faroe Islands (+298)">Faroe Islands (+298)</option>
<option value="Federated States of Micronesia (+691)">Federated States of Micronesia (+691)</option>
<option value="Fiji (+679)">Fiji (+679)</option>
<option value="Finland (+358)">Finland (+358)</option>
<option value="France (+33)">France (+33)</option>
<option value="French Guiana (+594)">French Guiana (+594)</option>
<option value="French Polynesia (+689)">French Polynesia (+689)</option>
<option value="Gabon (+241)">Gabon (+241)</option>
<option value="Georgia (+995)">Georgia (+995)</option>
<option value="Germany (+49)">Germany (+49)</option>
<option value="Ghana (+233)">Ghana (+233)</option>
<option value="Gibraltar (+350)">Gibraltar (+350)</option>
<option value="Greece (+30)">Greece (+30)</option>
<option value="Greenland (+299)">Greenland (+299)</option>
<option value="Grenada (+1)">Grenada (+1)</option>
<option value="Guadeloupe (+590)">Guadeloupe (+590)</option>
<option value="Guam (+1)">Guam (+1)</option>
<option value="Guatemala (+502)">Guatemala (+502)</option>
<option value="Guinea (+224)">Guinea (+224)</option>
<option value="Guinea-Bissau (+245)">Guinea-Bissau (+245)</option>
<option value="Guyana (+592)">Guyana (+592)</option>
<option value="Haiti (+509)">Haiti (+509)</option>
<option value="Honduras (+504)">Honduras (+504)</option>
<option value="Hong Kong (+852)">Hong Kong (+852)</option>
<option value="Hungary (+36)">Hungary (+36)</option>
<option value="Iceland (+354)">Iceland (+354)</option>
<option  value="India (+91)">India (+91)</option>
<option value="Indonesia (+62)">Indonesia (+62)</option>
<option value="Iran (+98)">Iran (+98)</option>
<option value="Iraq (+964)">Iraq (+964)</option>
<option value="Ireland (+353)">Ireland (+353)</option>
<option value="Israel (+972)">Israel (+972)</option>
<option value="Italy (+39)">Italy (+39)</option>
<option value="Jamaica (+1)">Jamaica (+1)</option>
<option value="Japan (+81)">Japan (+81)</option>
<option value="Jordan (+962)">Jordan (+962)</option>
<option value="Kazakhstan (+7)">Kazakhstan (+7)</option>
<option value="Kenya (+254)">Kenya (+254)</option>
<option value="Kiribati (+686)">Kiribati (+686)</option>
<option value="Kosovo (+381)">Kosovo (+381)</option>
<option value="Kuwait (+965)">Kuwait (+965)</option>
<option value="Kyrgyzstan (+996)">Kyrgyzstan (+996)</option>
<option value="Laos (+856)">Laos (+856)</option>
<option value="Latvia (+371)">Latvia (+371)</option>
<option value="Lebanon (+961)">Lebanon (+961)</option>
<option value="Lesotho (+266)">Lesotho (+266)</option>
<option value="Liberia (+231)">Liberia (+231)</option>
<option value="Libya (+218)">Libya (+218)</option>
<option value="Liechtenstein (+423)">Liechtenstein (+423)</option>
<option value="Lithuania (+370)">Lithuania (+370)</option>
<option value="Luxembourg (+352)">Luxembourg (+352)</option>
<option value="Macau (+853)">Macau (+853)</option>
<option value="Macedonia (+389)">Macedonia (+389)</option>
<option value="Madagascar (+261)">Madagascar (+261)</option>
<option value="Malawi (+265)">Malawi (+265)</option>
<option value="Malaysia (+60)">Malaysia (+60)</option>
<option value="Maldives (+960)">Maldives (+960)</option>
<option value="Mali (+223)">Mali (+223)</option>
<option value="Malta (+356)">Malta (+356)</option>
<option value="Marshall Islands (+692)">Marshall Islands (+692)</option>
<option value="Martinique (+596)">Martinique (+596)</option>
<option value="Mauritania (+222)">Mauritania (+222)</option>
<option value="Mauritius (+230)">Mauritius (+230)</option>
<option value="Mayotte (+262)">Mayotte (+262)</option>
<option value="Mexico (+52)">Mexico (+52)</option>
<option value="Moldova (+373)">Moldova (+373)</option>
<option value="Monaco (+377)">Monaco (+377)</option>
<option value="Mongolia (+976)">Mongolia (+976)</option>
<option value="Montenegro (+382)">Montenegro (+382)</option>
<option value="Montserrat (+1)">Montserrat (+1)</option>
<option value="Morocco (+212)">Morocco (+212)</option>
<option value="Mozambique (+258)">Mozambique (+258)</option>
<option value="Myanmar (+95)">Myanmar (+95)</option>
<option value="Namibia (+264)">Namibia (+264)</option>
<option value="Nauru (+674)">Nauru (+674)</option>
<option value="Nepal (+977)">Nepal (+977)</option>
<option value="Netherlands (+31)">Netherlands (+31)</option>
<option value="New Caledonia (+687)">New Caledonia (+687)</option>
<option value="New Zealand (+64)">New Zealand (+64)</option>
<option value="Nicaragua (+505)">Nicaragua (+505)</option>
<option value="Niger (+227)">Niger (+227)</option>
<option value="Nigeria (+234)">Nigeria (+234)</option>
<option value="Niue (+683)">Niue (+683)</option>
<option value="Norfolk Island (+672)">Norfolk Island (+672)</option>
<option value="North Korea (+850)">North Korea (+850)</option>
<option value="Northern Mariana Islands (+1)">Northern Mariana Islands (+1)</option>
<option value="Norway (+47)">Norway (+47)</option>
<option value="Oman (+968)">Oman (+968)</option>
<option value="Pakistan (+92)">Pakistan (+92)</option>
<option value="Palau (+680)">Palau (+680)</option>
<option value="Palestine (+970)">Palestine (+970)</option>
<option value="Panama (+507)">Panama (+507)</option>
<option value="Papua New Guinea (+675)">Papua New Guinea (+675)</option>
<option value="Paraguay (+595)">Paraguay (+595)</option>
<option value="Peru (+51)">Peru (+51)</option>
<option value="Philippines (+63)">Philippines (+63)</option>
<option value="Poland (+48)">Poland (+48)</option>
<option value="Portugal (+351)">Portugal (+351)</option>
<option value="Puerto Rico (+1)">Puerto Rico (+1)</option>
<option value="Qatar (+974)">Qatar (+974)</option>
<option value="Republic of the Congo (+242)">Republic of the Congo (+242)</option>
<option value="Réunion (+262)">Réunion (+262)</option>
<option value="Romania (+40)">Romania (+40)</option>
<option value="Russia (+7)">Russia (+7)</option>
<option value="Rwanda (+250)">Rwanda (+250)</option>
<option value="Saint Barthélemy (+590)">Saint Barthélemy (+590)</option>
<option value="Saint Helena (+290)">Saint Helena (+290)</option>
<option value="Saint Kitts and Nevis (+1)">Saint Kitts and Nevis (+1)</option>
<option value="Saint Martin (+590)">Saint Martin (+590)</option>
<option value="Saint Pierre and Miquelon (+508)">Saint Pierre and Miquelon (+508)</option>
<option value="Saint Vincent and the Grenadines (+1)">Saint Vincent and the Grenadines (+1)</option>
<option value="Samoa (+685)">Samoa (+685)</option>
<option value="San Marino (+378)">San Marino (+378)</option>
<option value="Sao Tome and Principe (+239)">Sao Tome and Principe (+239)</option>
<option value="Saudi Arabia (+966)">Saudi Arabia (+966)</option>
<option value="Senegal (+221)">Senegal (+221)</option>
<option value="Serbia (+381)">Serbia (+381)</option>
<option value="Seychelles (+248)">Seychelles (+248)</option>
<option value="Sierra Leone (+232)">Sierra Leone (+232)</option>
<option value="Singapore (+65)">Singapore (+65)</option>
<option value="Sint Maarten (+599)">Sint Maarten (+599)</option>
<option value="Slovakia (+421)">Slovakia (+421)</option>
<option value="Slovenia (+386)">Slovenia (+386)</option>
<option value="Solomon Islands (+677)">Solomon Islands (+677)</option>
<option value="Somalia (+252)">Somalia (+252)</option>
<option value="South Africa (+27)">South Africa (+27)</option>
<option value="South Korea (+82)">South Korea (+82)</option>
<option value="South Sudan (+211)">South Sudan (+211)</option>
<option value="Spain (+34)">Spain (+34)</option>
<option value="Sri Lanka (+94)">Sri Lanka (+94)</option>
<option value="St. Lucia (+1)">St. Lucia (+1)</option>
<option value="Sudan (+249)">Sudan (+249)</option>
<option value="Suriname (+597)">Suriname (+597)</option>
<option value="Swaziland (+268)">Swaziland (+268)</option>
<option value="Sweden (+46)">Sweden (+46)</option>
<option value="Switzerland (+41)">Switzerland (+41)</option>
<option value="Syria (+963)">Syria (+963)</option>
<option value="Taiwan (+886)">Taiwan (+886)</option>
<option value="Tajikistan (+992)">Tajikistan (+992)</option>
<option value="Tanzania (+255)">Tanzania (+255)</option>
<option value="Thailand (+66)">Thailand (+66)</option>
<option value="The Bahamas (+1)">The Bahamas (+1)</option>
<option value="The Gambia (+220)">The Gambia (+220)</option>
<option value="Timor-Leste (+670)">Timor-Leste (+670)</option>
<option value="Togo (+228)">Togo (+228)</option>
<option value="Tokelau (+690)">Tokelau (+690)</option>
<option value="Tonga (+676)">Tonga (+676)</option>
<option value="Trinidad and Tobago (+1)">Trinidad and Tobago (+1)</option>
<option value="Tunisia (+216)">Tunisia (+216)</option>
<option value="Turkey (+90)">Turkey (+90)</option>
<option value="Turkmenistan (+993)">Turkmenistan (+993)</option>
<option value="Turks and Caicos Islands (+1)">Turks and Caicos Islands (+1)</option>
<option value="Tuvalu (+688)">Tuvalu (+688)</option>
<option value="Uganda (+256)">Uganda (+256)</option>
<option value="Ukraine (+380)">Ukraine (+380)</option>
<option value="United Arab Emirates (+971)">United Arab Emirates (+971)</option>
<option value="United Kingdom (+44)">United Kingdom (+44)</option>
<option value="United States (+1)">United States (+1)</option>
<option value="Uruguay (+598)">Uruguay (+598)</option>
<option value="US Virgin Islands (+1)">US Virgin Islands (+1)</option>
<option value="Uzbekistan (+998)">Uzbekistan (+998)</option>
<option value="Vanuatu (+678)">Vanuatu (+678)</option>
<option value="Vatican City (+39)">Vatican City (+39)</option>
<option value="Venezuela (+58)">Venezuela (+58)</option>
<option value="Vietnam (+84)">Vietnam (+84)</option>
<option value="Wallis and Futuna (+681)">Wallis and Futuna (+681)</option>
<option value="Yemen (+967)">Yemen (+967)</option>
<option value="Zambia (+260)">Zambia (+260)</option>
<option value="Zimbabwe (+263)">Zimbabwe (+263)</option>
</select>

Friday, 23 November 2012

Difference between HTTP and HTTPS and Difference between GET and POST methods

1.Difference between HTTP and HTTPS



S.No HTTP HTTPS
1
URL begins with “http://" in case of HTTP
URL begins with “https://” in case of HTTPS.
2 HTTP is unsecured HTTPS is secured.
3 HTTP uses port 80 for communication HTTPS uses port 443 for communication.
4 HTTP operates at Application Layer HTTPS operates at Transport Layer.
5 No encryption is there in HTTP HTTPS uses encryption.
6 No certificates required in HTTP certificates required in HTTPS.
7 Most internet forums will probably fall into this category. Because these are open discussion forums, secured access is generally not required
HTTPS should be used in Banking Websites, Payment Gateway, Shopping Websites, Login Pages, Emails (Gmail offers HTTPS by default in Chrome browser) and Corporate Sector Websites. For example:

PayPal: https://www.paypal.com
Google AdSense: https://www.google.com/adsense/


2.Difference between GET and POST methods




S.No GET POST
1 Post Mechanism:



GET request is sent via URL.
Post Mechanism:



Post request is sent via HTTP request body or we can say internally.
2 Form Default Method:


GET request is the default method.
Form Default Method:


We have to specify POST method within form tag like
3
Security:

Since GET request is sent via URL, so that we can not use this method for sensitive data.
Security:

Since Post request encapsulated name pair values in HTTP request body, so that we can submit sensitive data through POST method.
4
Length:

GET request has a limitation on its length. The good practice is never allow more than 255 characters.
Length:

POST request has no major limitation.
5
Caching or Bookmarking:

GET request will be better for caching and bookmarking.
Caching or Bookmarking:

POST request is not better for caching and bookmarking.
6
SEO:

GET request is SEO friendly.
SEO:

POST request is not SEO friendly.
7
Data Type:

GET request always submits data as TEXT.
Data Type:

POST request has no restriction.
8
Best Example:

SEARCH is the best example for GET request.
Best Example:

LOGIN is the best example for POST request.
9
HTTP Request Message Format:

1 GET /path/file.html?SearchText=Interview_Question HTTP/1.0
2 From: umarali1981@gmail.com
3 User-Agent: HTTPTool/1.0
4 [blank line here]
HTTP Request Message Format:

1 POST /path/script.cgi HTTP/1.0
2 From: umarali1981@gmail.com
3 User-Agent: HTTPTool/1.0
4 Content-Type: application/x-www-form-urlencoded
5 Content-Length: 8
6
7 Code=132
Some comments on the limit on QueryString / GET / URL parameters Length:

1. 255 bytes length is fine, because some older browser may not support more than that.2. Opera supports ~4050 characters.3. IE 4.0+ supports exactly 2083 characters.4. Netscape 3 -> 4.78 support up to 8192 characters.5. There is no limit on the number of parameters on a URL, but only on the length.6. The number of characters will be significantly reduced if we have special characters like spaces that need to be URLEncoded (e.g. converted to the '%20').7. If we are closer to the length limit better use POST method instead of GET method.


What is Inheritance in C#


Creating a new class from existing class is called as inheritance. 

    //All the car properties can be used by the supercar
    class SuperCar : car
    {


    }


When a new class needs same members as an existing class, then instead of creating those members again in new class, the new class can be created from existing class, which is called as inheritance.


Main advantage of inheritance is
reusability of the code.


During inheritance, the class that is inherited is called as base class and the class that does the inheritance is called as derived class and every non private member in base class will become the member of derived class.

If you want the base class members to be accessed by derived class only , you can apply 
access modifier Protected to the base class member.

There are 5
Different types of inheritance.


Syntax

[Access Modifier] class ClassName : baseclassname

{
 


}

C# Inheritance Example


//Example program demonstrates singular inheritance
using System;

namespace ProgramCall
{
    class BaseClass
    {


        //Method to find sum of give  2 numbers
        public int FindSum(int x, int y)
        {
            return (x + y);
        }


        //method to print given 2 numbers
        //When declared protected , can be accessed only from inside the derived class
        //cannot access  with the instance of  derived class
        protected void Print(int x, int y)
        {
            Console.WriteLine("First Number: " + x);
            Console.WriteLine("Second Number: " + y);

        }
    }


    class Derivedclass : BaseClass
    {

        public void Print3numbers(int x, int y, int z)
        {
            Print(x, y); //We can directly call baseclass members
            Console.WriteLine("Third Number: " + z);
        }

    }


    class MainClass
    {

        static void Main(string[] args)
        {
            //Create instance for derived class, so that base class members
            // can also  be accessed
            //This is possible because  derivedclass is inheriting base class

            Derivedclass instance = new Derivedclass();

            instance.Print3numbers(30, 40, 50); //Derived class internally calls base class method.
            int sum = instance.FindSum(30, 40); //calling base class method with derived class instance
            Console.WriteLine("Sum : " + sum);


            Console.Read();
        }

    }
}

Output

First Number: 30
Second Number: 40
Third Number: 50
Sum : 70 


Different Types of Inheritance



Creating a new class from existing class is called as inheritance.

What is Inheritance in C#

Inheritance can be classified to 5 types.

  1. Single Inheritance
  2. Hierarchical Inheritance
  3. Multi Level Inheritance
  4. Hybrid Inheritance
  5. Multiple Inheritance
1. Single Inheritance

when a single derived class is created from a single base class then the inheritance is called as single inheritance.


Different types of inheritance

Single Inheritance Example Program

2. Hierarchical Inheritance

when more than one derived class are created from a single base class, then that inheritance is called as hierarchical inheritance.

Hierarical Inheritance


3. Multi Level Inheritance

when a derived class is created from another derived class, then that inheritance is called as multi level inheritance.

Multi level Inheritance


4. Hybrid Inheritance

Any combination of single, hierarchical and multi level inheritances is called as hybrid inheritance.


Hybrid inheritance in C#


5. Multiple Inheritance

when a derived class is created from more than one base class then that inheritance is called as multiple inheritance. But multiple inheritance is not supported by .net using classes and can be done using interfaces.

Multiple inheritance in C#

  Multiple Inheritance Example

Handling the complexity that causes due to multiple inheritance is very complex. Hence it was not supported in dotnet with class and it can be done with interfaces.

Polymorphism



According to MSDN, Through inheritance, a class can be used as more than one type; it can be used as its own type, any base types, or any interface type if it implements interfaces. This is called polymorphism.

 
In C#, every type is polymorphic. Types can be used as their own type or as a Object instance, because any type automatically treats Object as a base type.


Polymorphism means having more than one form. Overloading and overriding are used to implement polymorphism. Polymorphism is classified into compile time polymorphism or early binding or static binding and Runtime polymorphism or late binding or dynamic binding.

Polymorphism Examples



Compile time Polymorphism or Early Binding

The polymorphism in which compiler identifies which polymorphic form it has to execute at compile time it self is called as compile time polymorphism or early binding.
 
Advantage of early binding is execution will be fast. Because every thing about the method is known to compiler during compilation it self and disadvantage is lack of flexibility.

Examples of early binding are overloaded methods, overloaded operators and overridden methods that are called directly by using derived objects.

Runtime Polymorphism or Late Binding

The polymorphism in which compiler identifies which polymorphic form to execute at runtime but not at compile time is called as runtime polymorphism or late binding.
 
Advantage of late binding is flexibility and disadvantage is execution will be slow as compiler has to get the information about the method to execute at runtime.

Example of late binding is overridden methods that are called using base class object.

Components of .Net Framework



component.jpg
Common Language Runtime
CLR is the heart of .Net Framework.
CLR is one of the key components of .Net Framework. CLR is the core runtime engine in the Microsoft .NET Framework for executing all kinds of applications.

Execution environment for code written in .NET Framework.
The CLR is described as the "execution engine" of .NET. It is this CLR that manages the execution of programs. It provides the environment within which the programs run. The software version
of .NET is actually the CLR version.

The CLR works with every language available for the .NET Framework.
The CLR is a multi-language execution environment. There are currently over 15 compilers being built by Microsoft and other companies producing code that will execute in CLR.

But CLR is not a common compiler for all .NET compatible languages.
We all know that .Net framework supports 70+ languages. But, since CLR is mentioned as the “execution engine” of .Net framework, it is not a common compiler for all language that converts the source code of any language to Machine code or Managed code.

Note: All .Net compatible languages have their own compiler. (i.e.) all 70+ languages have their own compiler.

Common Type System
CTS describes a set of types (Data Types) that can be used in different .Net languages in common. (i.e), CTS ensures that objects written in different .Net languages can interact with each other.
For Communicating between programs written in any .NET complaint language, the types have to be compatible on the basic level.
The common type system supports two general categories of types:
Value types:
Value types directly contain their data, and instances of value types are either allocated on the stack or allocated inline in a structure. Value types can be built-in (implemented by the runtime), user-defined, or enumerations.
Reference types:
Reference types store a reference to the value's memory address, and are allocated on the heap. Reference types can be self-describing types, pointer types, or interface types. The type of a reference type can be determined from values of self-describing types. Self-describing types are further split into arrays and class types. The class types are user-defined classes, boxed value types, and delegates.
Common Language Specification
Common Language Specification is a sub set of CTS.
CLS specifies a set of rules that needs to be adhered or satisfied by all language compilers targeting CLR.
CLS helps in cross language inheritance and cross language debugging.
Common language specification rules:
It describe the minimal and complete set of features to produce code that can be hosted by CLR 
It ensure that products of compilers will work properly in .NET environment 
Sample rules: 
Representation of text strings 
Internal representation of enumerations 
Definition of static members and this is a subset of the CTS which all .NET languages are expected to support.
Microsoft has defined CLS which are nothing but guidelines that language to follow so that it can communicate with other .NET languages in a seamless manner.

Base Class Library
Also called as Framework Class Library.
BCL are similar to header file in other programming languages.
BCL are set of predefined code available for all languages supporting .Net Framework
Developers just need to import the BCL in their language code and use its predefined methods and properties to implement common and complex functions like reading and writing to file, graphic rendering, database interaction, and XML document manipulation.  

Abstract classes




1. They are classes that cannot be instantiated.
2. Either partially implemented, or not at all implemented.
3. One key difference between abstract classes and interfaces is that a class may implement an unlimited number of interfaces,
but may inherit from only one abstract (or any other kind of) class.
4. A class that is derived from an abstract class may still implement interfaces
5. In C#, the abstract modifier is used
6. Any methods that are to be implemented are marked as abstract
7. eg:
abstract class WashingMachine
{
  public WashingMachine()
  {
 // Code to initialize the class goes here.
  }

  abstract public void Wash();
  abstract public void Rinse(int loadSize);
  abstract public long Spin(int speed);
}
8. A class inheriting from this class would have to implement the Wash, Rinse, and Spin methods
9. eg:

class MyWashingMachine : WashingMachine
{
  public MyWashingMachine()
  {
 // Initialization code goes here.  
  }

  override public void Wash()
  {
 // Wash code goes here.
  }

  override public void Rinse(int loadSize)
  {
 // Rinse code goes here.
  }

  override public long Spin(int speed)
  {
 // Spin code goes here.
  }
}
10. When implementing an abstract class, you must implement each abstract (MustOverride) method in that class
11. Each implemented method must receive the same number and type of arguments, and have the same return value, as the method specified in the abstract class.




IE7 Issues Text Indent

                 Unfortunately IE 7 is still widespread among the users hence while theming we have to give special importance to the grea...