Sunday, September 25, 2011

Polymorphism In C#


Polymorphism In C# With Examples


Polymorphism is an important and fundamental pillar of Object Oriented Programming.Polymorphism means many forms . Polymorphism is of two types.
1. Compile Time Polymorphism/Method Overloading
2.Runtime Polymorphism/Method Overriding.

Compile Time Polymorphism
Compile time polymorphism is done within a class having two methods with the same name but should have two different parameters
Runtime Polymorphism
Runtime Polymorphism is implemented when we create a base class with virtual methods and create derived classes that overide the behavior ofthe base class's virtual method

Method Overloading Example
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
   class Mymath
    {
        public int Add(int a,int b)
        {
            return a + b;
        }
        public int Add(int a, int b, int c)
        {
           return a + b + c;
       }
    }
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
// Default Program Class
    class Program
    {
        static void Main(string[] args)
        {
            Mymath obj = new Mymath();
            obj.Add();
            Console.ReadLine();

        }
    }

Method Overiding Example
Examples From Three Classes
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
// Derived Class  
class Cat:Pet
    {
        public override void faithful()
        {
            Console.WriteLine("I am faithful");       
        }
    }
//Base Class
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

  class Pet
    {
        public virtual void faithful()
        {
            Console.WriteLine("I am faithful");

        }
    }

//Default Program Class
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

    class Program
    {
        static void Main(string[] args)
        {
            Cat obj = new Cat();
            obj.faithful();
            Console.ReadLine();
        }
    }

Friday, August 12, 2011

C# (C Sharp ) Tutorial

C Sharp Tutorial For Creating Classes For Beginners

Guys this my very first tutorial for C# (C sharp) I am not discussing about the object oriented programming but i am discussing the very fundamental parts of Object Oriented Programming Which Is Creating A Class.
First You Have To Open Visual Studio Then New Project And After that in Windows Section You Have to Choose Console Application


You will found the default class of Program Leave It Create a new class of Animal
and write this code

I have created a class of animal and in this class i have created two public objects
    class Animal
    {
        public void Meow()
        {
            Console.WriteLine("Hello");
        }
        public void Jump()
        {
            Console.WriteLine("Hey,I Can Jump");
        }

    }


After that Open your default program class and write this code

  class Program
    {
        static void Main(string[] args)
        {
            Animal fillis = new Animal();
            fillis.Jump();
            fillis.Meow();
            Console.ReadLine();
        }
    }
In my program class i have call my animal class and i have call their objects

Php Syntax

Php And Its Syntax

Php hypertext preprocessor is a open source programming language you can start php and its free by downloading the wamp server if you are using windows, Mamp if you are using Macs every tool of php is very and is giving is environment for free and its IDE also . I am trying to teach you the writing syntax for php and if you are beginner then this post is for you

The syntax for Php is following and its given below :

<?php

//the body goes here



?>

these are the tags for writing php if you are doing coding in php then you will do in between these tags .

Saturday, August 6, 2011

Search Engine Optimization

Search Engine Optimization On Different Technologies And Content Management System

 Search Engine Optimization Means Optimize Your Website For Search Engines For Getting Traffic . There are many tricks for search engine optimization which i will discuss later . The latest technologies have made the SEO very easy as i talk about wordpress,joomla and drupal or many other cms . Blogger also have some very basic tricks for SEO such as labels in the post or in the head tag. There are many many other different tricks such as Social Media Marketing,Backlinks and Blog Commenting which have SEO on the peak . I will discuss about the two main topics of SEO in the next Topic About On and Off Page Optimization . And Black And White Hate Search Engine Optimization

Thursday, August 4, 2011

PHP ( HyperText Preprocessor )

HyperText Preprocessor 


Php is a server side scripting language that allows your website to be truly dynamic . Php stands for hypertext preprocessor ( and yes we are aware Php is a recursive acronym ) probably meant to be confuse the masses).
Its flexibility and relatively small learning curve (especially for programmers who have a background of C,Java Or Perl)make it one of the most popular scripting languages around. PHP's popularity continues to increase as business and individuals everywhere embrace it as an alternative to Microsoft's ASP language and realise   that PHP benefits most certainly outweigh the cost three cheers for open source.According to Netcraft PHP code can now be found approximately 16 million Websites In The World.

You people can download the software of php from php.net



Tuesday, August 2, 2011

A Brief History Of Open Source Initiatives

Open Source Technologies

The term open source was coined in 1998 after Netscape decided to publish the source code for its popular Navigator Browser.This announcement prompted a small group of software developers who had been long-time supporters of the soon to be open source ideology to formally develop the Open Source Initiatives  (OSI) and the Open Source Definition


Although the OSI ideology was initially promoted in the hacker community , upon Netscape's release of Navigator's source code, programmers from all walks of life began to offer suggestions and fixes to improve the browsers community performance . The OSI mission was of and running as the mainstream computing world began to embrace the idea.

Linux became the first operating system that could be considered open source (although BSD was a close runner-up distributed from Berkeley in 1989), and many programs followed soon thereafter .Large software corporations, such as Corel , began to offer version of their programs that worked on Linux machines

Sunday, July 31, 2011

Php , Apache , MySql And Open Source

Brief Introduction About Php,Apache,Mysql And Open Source

Php,Apache and MySql are all part of the open source group of software programs. The open source movement is a collaboration of some of the finest minds in computer programming By allowing the open exchange of information, programmers from all over the world contribute to make a truly powerfully and efficient piece of software available to everyone. Through the contributions of many people to the publicly available souce code , bugs get fixed, improvements are made and a good software program becomes a great one over time