Thursday, July 26, 2012

Evolution of C# (1.0 – 5.0) – What are the New Features Introduced in C#


C# is not new to us. We are using it since Visual Studio 2002. Currently it is in released version 4.0 and C# 5.0 is on the way to release with Visual Studio 2012. Though we are using it since a long time, but many of us don’t know the new features that has been introduced in each new release.

This post will cover the “Evolution of C#” from version 1.0 to version 5.0 along with the new features and respective Visual Studio version. Bookmark this post for future reference and share it to your network and help others to know.

 C# 1.0
Microsoft released the first version of C# with Visual Studio 2002. Use of Managed Code was introduced with this version. C# 1.0 was the first language that developer adopted to build .NET applications.

C# 2.0
Microsoft released the second version of C# language with Visual Studio 2005. C# 2.0 has three new features introduced in this edition which helped the developers to code their applications in more generic way. Here are the new features that was introduced with C# 2.0:
1.     Generics
2.     Anonymous Methods
3.     Nullable Type
4.     Partial Class
5.     Covariance and Contra-variance
C# 3.0
Visual Studio 2008 came with C# version 3.0 and it has a bunch of new features. It was the life changing language for Microsoft platform developers to build their applications. Till now, many developers are still using this version to build their apps. Here are the new features that came with C# 3.0:
1.     Lambda Expression
2.     Extension Method
3.     Expression Tree
4.     Anonymous Types
5.     LINQ
6.     Implicit Type (var)
C# 4.0
Though C# 4.0 was released with Visual Studio 2010 with .NET Framework 4, but very few developers uses it’s new features till date. Keep in mind that, it is the latest release version. Here is a list of new features of C# that came with this version:
1.     Late Binding
2.     Named Arguments
3.     Optional Parameters
4.     More COM Support
C# 5.0
Visual Studio 2012 is coming up with C# 5.0 and it will be available within next few months in 2012. The release candidate (RC) version is available for you to try out the new features. Here are two new features that is coming up with C# 5.0:
1.     Async Feature
2.     Caller Information

Infographic of C# Evolution
Here is the infographic of “Evolution of C#” and the new features introduced in different releases of C# and Visual Studio IDE, which you can bookmark for your future reference:




  

Wednesday, July 4, 2012

Steps To Make Internet Download Manager Full Version


1. Make sure you have installed the latest version of IDM from the official website.
2. Now navigate to “C:\Window\System32\Drivers\etc”.
3. You will see a file named “hosts”. Open that file using Notepad.
4. Now copy all the given lines of code at the bottom of the hosts file as shown in the screenshot below.
127.0.0.1    tonec.com
127.0.0.1    www.tonec.com
127.0.0.1    registeridm.com
127.0.0.1    www.registeridm.com
127.0.0.1    secure.registeridm.com
127.0.0.1    internetdownloadmanager.com
127.0.0.1    www.internetdownloadmanager.com
127.0.0.1    secure.internetdownloadmanager.com
127.0.0.1    mirror.internetdownloadmanager.com
127.0.0.1    mirror2.internetdownloadmanager.com

















After doing this, enter any of the serial from one of the below into the IDM registration menu.

RLDGN-OV9WU-5W589-6VZH1
HUDWE-UO689-6D27B-YM28M
UK3DV-E0MNW-MLQYX-GENA1
398ND-QNAGY-CMMZU-ZPI39
GZLJY-X50S3-0S20D-NFRF9
W3J5U-8U66N-D0B9M-54SLM
EC0Q6-QN7UH-5S3JB-YZMEK
UVQW0-X54FE-QW35Q-SNZF5
FJJTJ-J0FLF-QCVBK-A287M
For any further query, leave your comment below.

Sunday, July 1, 2012


In this post you are going to learn all about jQuery Accordion Widget.

jQuery Accordion Widget is a jQuery based expandable and collapsable content holder that is
 broken into sections and probably looks like tabs. Look at the animated screen given below:

Graphical representation of jQuery UI subordinates:


In the above image, I have highlighted the jQuery UI Interaction Plugins in rectangular region and
 in this post we will cover all of them.

You need to setup a demo project to learn Interaction Plugins, please read this post as this post 
will guide you how to setup the demo project for jQuery UI.

Draggable

It enables draggable functionality on any DOM element. Move the draggable object by clicking on 
it with the mouse and dragging it anywhere within the viewport.

Let’s create a demonstration page:














In above code, I have a by id ‘draggableDIV’ and it has a button. Remember we can’t drag button 
control directly because it holds click event by default; we need to do some extra work for this. 
But if you place button inside tag then you can drag it easily. And the same, I have a label control
 by id ‘draggableLabel’.

In above jQuery methods, $(“draggableDIV”).draggable() will enable the drag feature in
tag. And the same $(“draggableLabel”).draggable() will enable the drag feature in Label control.

If you look at the output screen in browser given below, think we have not applied any
background color instead of width, height and padding but still you can see the color. Why?
 This is because; remember in last posthere, we were selected theme option to download jQuery
 UI Library. So, in tag you can see class attribute that is ‘ui-widget-content’ and this style rule
 is defined in file ‘jquery-ui-1.8.21.custom.css’.

Open the code in browser to see draggable in action.






















Read more about draggable options, events and methods here.

Droppable

It enables any DOM element to be droppable, a target for draggable elements.

Let’s create a demonstration page:






























Frist of all let’s look at the applied styles and then we’ll talk on jQuery methods:

#draggable { width100pxheight100pxpadding0.5emfloatleftmargin10px 10px 10px 0; }
#droppable { width150pxheight150pxpadding0.5emfloatleftmargin10px; }

Just applying the styles width, height, padding, float and margin to both
’s.

              $(function () {
                  $("#draggable").draggable();
                  $("#droppable").droppable({
                      drop: function (event, ui) {
                          $(this)
                             .addClass("ui-state-highlight")
                             .find("p")
                             .html("Dropped!");
                      }
                  });
              });

The very first line of the method is simple; it will add draggable feature to
which has id = ‘draggable’. The second method is bit fancy, adding the droppable feature to
which has id = ‘droppable’.

All callbacks receive two arguments: The original browser event and a prepared ui object,
 view below for a documentation of this object (if you name your second argument 'ui'):

ui.draggable - current draggable element, a jQuery object.
ui.helper - current draggable helper, a jQuery object
ui.position - current position of the draggable helper { top: , left: }
ui.offset - current absolute position of the draggable helper { top: , left: }

See the page in action.























Let’s assume if you want multiple draggable elements on the page, then you can use following 
coding.

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Multiple Draggabletitle>
    <link type="text/css" href="Scripts/css/ui-lightness/jquery-ui-1.8.20.custom.css" 
rel="Stylesheet" />   
    <script type="text/javascript" src="Scripts/js/jquery-1.7.2.min.js">script>
    <script type="text/javascript" src="Scripts/js/jquery-ui-1.8.20.custom.min.js">script>
    <style type="text/css">
              #draggable-1 {
            background-color:#CCC;
            width100px;
            height100px;
            padding0.5em;
            floatleft;
            margin10px 10px 10px 0;
        }
        #draggable-2 {
            background-color:#E34E47;
            width100px;
            height100px;
            padding0.5em;
            floatleft;
            margin10px 10px 10px 0;
        }
        #droppable {
            background-color:#0F0;
            width150px;
            height150px;
            padding0.5em;
            floatleft;
            margin10px;
        }
          style>
          <script type="text/javascript">
              $(function () {
                  $("#draggable-1").draggable();
                  $("#draggable-2").draggable();

                  $("#droppable").droppable({
                      drop: function (event, ui) {
                          var currentId = $(ui.draggable).attr('id');

                          if (currentId == "draggable-1") {
                              $(this)

                              window.location = "http://www.itorian.com/search/label/jQuery"
                              alert("You are going to learn jQuery.")

                          } else {
                              $(this)

                              window.location = "http://www.itorian.com/search/label/ASP.NET"
                              alert("You are going to learn ASP.NET.")
                          }
                      }
                  });
              });
          script>
head>
<body>
    <form id="form1" runat="server">
        <div id="draggable-1">
            <p>Let's go to learn jQuery.p>
        div>

        <div id="draggable-2">
            <p>Let's go to learn ASP.NET.p>
        div>

        <div id="droppable">
            <p>Please come, i'll teach you.p> 
        div>
    form>
body>
html>

See the page in action.























Read more about droppable options, events and methods here.


Resizable

It enables any DOM element to be resizable. With the cursor grab the right or bottom border and drag to the desired width or height.

Let’s create a demonstration page:

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>One Draggabletitle>
    <link type="text/css" href="Scripts/css/ui-lightness/jquery-ui-1.8.20.custom.css" rel="Stylesheet" />   
    <script type="text/javascript" src="Scripts/js/jquery-1.7.2.min.js">script>
    <script type="text/javascript" src="Scripts/js/jquery-ui-1.8.20.custom.min.js">script>
    <style type="text/css">
              #resizable { width150pxheight150pxpadding0.5em; }
              #resizable h3 { text-aligncentermargin0; }
          style>
          <script type="text/javascript">
              $(function () {
                  $("#resizable").resizable();
              });
          script>
head>
<body>
    <form id="form1" runat="server">
        <div id="resizable" class="ui-widget-content">
                  <h3 class="ui-widget-header">Resizableh3>
        div>
    form>
body>
html>

Nothing new here, let’s look it in bowser.





















Selectable

It enables a DOM element (or group of elements) to be selectable. Draw a box with your cursor to select items. Hold down the Ctrl key to make multiple non-adjacent selections.

Let’s create a demonstration page:

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>One Draggabletitle>
    <link type="text/css" href="Scripts/css/ui-lightness/jquery-ui-1.8.20.custom.css" rel="Stylesheet"/>      
    <script type="text/javascript" src="Scripts/js/jquery-1.7.2.min.js">script>
    <script type="text/javascript" src="Scripts/js/jquery-ui-1.8.20.custom.min.js">script>
    <style type="text/css">
           #feedback { font-size1.4em; }
           #selectable .ui-selecting { background#FECA40; }
           #selectable .ui-selected { background#F39814colorwhite; }
           #selectable { list-style-typenonemargin0padding0width60%; }
           #selectable li { margin3pxpadding0.4emfont-size1.4emheight18px; }
       style>
       <script type="text/javascript">
           $(function () {
               $("#selectable").selectable();
           });
       script>
head>
<body>
    <form id="form1" runat="server">
        <ol id="selectable">
               <li class="ui-widget-content">Item 1li>
               <li class="ui-widget-content">Item 2li>
               <li class="ui-widget-content">Item 3li>
               <li class="ui-widget-content">Item 4li>
               <li class="ui-widget-content">Item 5li>
               <li class="ui-widget-content">Item 6li>
               <li class="ui-widget-content">Item 7li>
        ol>
    form>
body>
html>

The jQuery UI Selectable plugin allows for elements to be selected by dragging a box (sometimes called a lasso) with the mouse over the elements. Also, elements can be selected by click or drag while holding the Ctrl/Meta key, allowing for multiple (non-contiguous) selections. Let’s look it in bowser.























Sortable

It enables a group of DOM elements to be sortable. Click on and drag an element to a new spot within the list, and the other items will adjust to fit. By default, sortable items share draggable properties.

Let’s create a demonstration page:

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>One Draggabletitle>
    <link type="text/css" href="Scripts/css/ui-lightness/jquery-ui-1.8.20.custom.css" rel="Stylesheet"/>      
    <script type="text/javascript" src="Scripts/js/jquery-1.7.2.min.js">script>
    <script type="text/javascript" src="Scripts/js/jquery-ui-1.8.20.custom.min.js">script>
    <style type="text/css">
           #sortable { list-style-typenonemargin0padding0width60%; }
           #sortable li { margin0 3px 3px 3pxpadding0.4empadding-left1.5emfont-size1.4em;height18px; }
           #sortable li span { positionabsolutemargin-left-1.3em; }
       style>
       <script type="text/javascript">
           $(function () {
               $("#sortable").sortable();
               $("#sortable").disableSelection();
           });
       script>
head>
<body>
    <form id="form1" runat="server">
        <ul id="sortable">
               <li class="ui-state-default"><span class="ui-icon ui-icon-arrowthick-2-n-s">span>Item 1li>
               <li class="ui-state-default"><span class="ui-icon ui-icon-arrowthick-2-n-s">span>Item 2li>
               <li class="ui-state-default"><span class="ui-icon ui-icon-arrowthick-2-n-s">span>Item 3li>
               <li class="ui-state-default"><span class="ui-icon ui-icon-arrowthick-2-n-s">span>Item 4li>
               <li class="ui-state-default"><span class="ui-icon ui-icon-arrowthick-2-n-s">span>Item 5li>
               <li class="ui-state-default"><span class="ui-icon ui-icon-arrowthick-2-n-s">span>Item 6li>
               <li class="ui-state-default"><span class="ui-icon ui-icon-arrowthick-2-n-s">span>Item 7li>
        ul>
    form>
body>
html>

The jQuery UI Sortable plugin makes selected elements sortable by dragging with the mouse. 
All callbacks receive two arguments: The original browser event and a prepared ui object, 
view below for a documentation of this object (if you name your second argument 'ui'):-

ui.helper - the current helper element (most often a clone of the item)
ui.position - current position of the helper
ui.offset - current absolute position of the helper
ui.item - the current dragged element
ui.placeholder - the placeholder (if you defined one)
ui.sender - the sortable where the item comes from (only exists if you move from one connected 
list to another)

Let’s look it in bowser.

























I hope you like it. Thanks.