<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3090727938691946351</id><updated>2011-08-26T16:39:29.686-07:00</updated><category term='C# Programming'/><category term='Programming'/><title type='text'>Vickys Progr@mming environment</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>28</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-7286472739291845579</id><published>2009-10-23T09:55:00.000-07:00</published><updated>2009-12-06T00:14:44.794-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>Polymorphism</title><content type='html'>As the same name suggests 'Poly' (many) 'morphos' (forms) an object existing in different forms.  In our Programming environment we call it as an "Entity existing in many forms". Resilence to change is the best example of polymorphism. In OOPs we express polymorphism as  &lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;" One Interface, Multiple Functions". &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Talking about kinds of Polymorphism, they are classified into two basic forms&lt;br /&gt;&lt;br /&gt;1. Static Polymorphism  or compile time polymorphism&lt;br /&gt;2. Dynamic Polymorphism or run time polymorphism.&lt;br /&gt;&lt;br /&gt;In our programming environment we can see the importance of polymorphism by creating more than one function in a class with the same name but differing them with the parameter declaration, i.e method overloading is one of the feature where we see the implementation of polymorphism.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;example: a woman who can be a wife, a daughter,a  sister,a mother etc.... is an example of polymorphism.&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Static Polymorphism&lt;/span&gt;:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;"The Mechanism of linking a function to a class object at compile time is called static polymorphism or early binding. "&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;C# uses two approaches to implement static polymorphism.....&lt;br /&gt;&lt;br /&gt;1. Function overloading.&lt;br /&gt;2. Operator Overloading.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. Function Overloading: &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Process of defining a function multiple times with same name inside a single class by changing the type of parameters, sequence of parameters, no of parameters.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;additionFunction(int n1,int n2);&lt;br /&gt;additionFunction(float n1, float n2);&lt;br /&gt;&lt;br /&gt;Here the return type of the functions can be same or they can differ.&lt;br /&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;2. Operator Overloading: &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;/*&lt;br /&gt;&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Dynamic Polymorphism&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;In Dynamic polymorphism the decision about function execution is made at runtime. Dynamic polymorphism is more useful as compared to static polymorphism because dynamic polymorphism gives much flexibility for manipulating objects.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;"The mechanism of linking of a function with an object at runtime is called Dynamic Polymorphism of late binding. "&lt;br /&gt;&lt;/blockquote&gt;C# uses two approaches to implement dynamic polymorphism,&lt;br /&gt;&lt;br /&gt;1. Abstract classes .&lt;br /&gt;2. Virtual Functions.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. Abstract classes:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;These are special type of base classes that consists of abstract class members. we can have abstract classes as well as abstract methods, and any class that contains one or more abstract methods must also be declared abstract. To declare a class abstract, you simply use the abstract keyword in front of the class keyword.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;We cant create objects for abstract classes i.e ( classname &lt;class&gt; obj=new classname&lt;class&gt;), this kind of declaration is not possible for abstract classes.&lt;br /&gt;&lt;br /&gt;We can create object references for abstract classes i.e (&lt;class&gt; classname ref; ).&lt;br /&gt;&lt;br /&gt;We cant declare abstract static methods and abstract constructors.&lt;br /&gt;&lt;/class&gt;&lt;/class&gt;&lt;/class&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. Virtual Functions: &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;These are the functions which do not really exists, but appear to be present in some parts of the program.&lt;input id="gwProxy" type="hidden"&gt;&lt;!--Session data--&gt;&lt;input onclick="jsCall();" id="jsProxy" type="hidden"&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;input id="gwProxy" type="hidden"&gt;&lt;!--Session data--&gt;&lt;input onclick="jsCall();" id="jsProxy" type="hidden"&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-7286472739291845579?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/7286472739291845579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=7286472739291845579' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/7286472739291845579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/7286472739291845579'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2009/10/polymorphism.html' title='Polymorphism'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-6330776673283054639</id><published>2009-09-16T09:33:00.000-07:00</published><updated>2009-10-23T10:43:41.419-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>Destructors</title><content type='html'>&lt;ul&gt;&lt;li&gt;Destructors are the special methods that r used to release the instance of the class from memory. &lt;/li&gt;&lt;li&gt;The main purpose of it is to perform the memory clean up action. the programmer can not have any control to call the destructor.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The .Net frame work automatically runs the destructor to destroy objects in the memory.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;A single class can have only one destructor. &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Declaration of Destructor&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Destructor follows the same rules as that of constructors but the difference comes in the functioning.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Destructor has same name as class name as its class but is prefixed with a '~' called as tilde operator.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Destructors can not be inherited or overloaded.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;example:&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;&lt;br /&gt;class Addition&lt;br /&gt;{&lt;br /&gt;&lt;blockquote&gt;static int n1,n2;&lt;br /&gt;int total;&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;}&lt;br /&gt;&lt;br /&gt;Addition()&lt;br /&gt;{&lt;blockquote&gt;n1=5;&lt;br /&gt;n2=3;&lt;br /&gt;total=0;&lt;/blockquote&gt;}&lt;br /&gt;public void operation()&lt;br /&gt;{&lt;br /&gt;&lt;blockquote&gt;total=n1+n2;&lt;br /&gt;Console.WriteLine("The result is {0}", total);&lt;/blockquote&gt;}&lt;br /&gt;~Addition()/*.............. Destructor.............*/&lt;br /&gt;{&lt;br /&gt;&lt;blockquote&gt;Console.WriteLine("Destructor invoked");&lt;/blockquote&gt;}&lt;br /&gt;static void Main(String [] arg)&lt;br /&gt;{&lt;br /&gt;&lt;blockquote&gt;Addition obj=new Addition();&lt;br /&gt;obj.operation();&lt;/blockquote&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;note: Even when u dont call the destructor, garbage collector releases the memory.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Garbage Collection&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;It is a process that automatically frees the memory space which is used for the objects at the time of program execution.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The memory for the object is freed only after observing the status of the object (i.e when object is no longer in use).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The decision to invoke the destructor is made by a special program of C# called as &lt;span style="font-style: italic;"&gt;garbage collector. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;In C#, you can not destroy an object explicitly in code, in fact it has the feature of garbage collection which destroys the objects for the programmers.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Garbage collection mainly involves,&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt; objects get destroyed: doesnt specify when the object is destroyed.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Only unused objects are destroyed: object is nt deleted unless it holds any reference.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;C# uses two special methods to release the instance of a class from memory&lt;/li&gt;&lt;/ul&gt;&lt;ol&gt;&lt;li&gt;Finalize() &lt;/li&gt;&lt;li&gt;Dispose()&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;Finalize destructor is a special method that is called from the class to which it belongs or from the derived class.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;It is called only after the last reference of the object is released from the memory.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;.Net frame work automatically runs the Finalize() destructor to destroy objects in the memory. and keep in mind that the Finalize method does nt invoke immediately.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Dispose() method is called to release a resource, such as a database connection as soon as the object using such a resource is no longer in use.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Unlike the Finalize() destructor , the Dispose() method is not called automatically, and you must explicitly call  it from the client application when an object is no longer needed.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;IDisposable interface contains the Dispose() method. So in order to invoke the Dispose() method a class must implement the IDisposable interface.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-6330776673283054639?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/6330776673283054639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=6330776673283054639' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/6330776673283054639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/6330776673283054639'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2009/09/destructors.html' title='Destructors'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-2201174671623666590</id><published>2009-09-15T12:40:00.000-07:00</published><updated>2009-09-14T09:26:17.931-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>Constructors  and Destructors</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Constructors&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;These form the special member functions of the class .&lt;/li&gt;&lt;li&gt; These have the same name as class name and constructors do not return any value .&lt;/li&gt;&lt;li&gt;A Constructor is complimentary to a destructor. It is a good programming to use both constructors as well as destructors. &lt;/li&gt;&lt;li&gt;Constructors can be defined in two ways as&lt;blockquote&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;1. static Constructors.&lt;br /&gt;2.Instance Constructors.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Static Constructors:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;These r used to intialise static variables of a class. &lt;/li&gt;&lt;li&gt;These variables r created using &lt;span style="color: rgb(0, 153, 0);"&gt;static &lt;/span&gt;key word and they store values that can be shared by all the instances of a class . &lt;/li&gt;&lt;li&gt;Static constructors have an implict private access. &lt;/li&gt;&lt;li&gt;These ill be invoked only once during execution.&lt;/li&gt;exam:&lt;br /&gt;&lt;br /&gt;public class Example&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;static int n1;&lt;br /&gt;int n2;&lt;br /&gt;&lt;br /&gt;static Example()&lt;br /&gt;{&lt;br /&gt;n1=5;  /*.................. accepts the value for variable n1............................*/&lt;br /&gt;&lt;br /&gt;n2=10;  /.......................... puts an error msg...........*/&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/ul&gt;note: We use constructors to intialise data members and not for any input or output operations.&lt;br /&gt;and we can have more than one constructor for a class.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Constructors with parameters&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;At times user wants to pass values to variables at run time where it cant be possible through intializing them at the starting of prog, so during this situation he can make use of passing the values to variables through parameters.&lt;br /&gt;constructors can be used in order to supply values to variables at run time. ......&lt;br /&gt;&lt;br /&gt;here is an exam program to illustrate the process of functioning.........&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;&lt;br /&gt;namespace arithemetic_oper&lt;br /&gt;{&lt;br /&gt;class Addition&lt;br /&gt;{&lt;br /&gt;static int num1,num2;&lt;br /&gt;int total;&lt;br /&gt;&lt;br /&gt;Addition(int n1,int n2)&lt;br /&gt;{&lt;br /&gt; num1=n1;&lt;br /&gt; num2=n2;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void addNum()&lt;br /&gt;{&lt;br /&gt;total=num1+num2;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void displayNum()&lt;br /&gt;{&lt;br /&gt;Console.WriteLine(" Result is : {0}",total);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public static void Main(String [] arg)&lt;br /&gt;{&lt;br /&gt;int var1,var2;&lt;br /&gt;Console.WriteLine("Enter the var1:\t");&lt;br /&gt;var1= Convert.ToInt32(Console.ReadLine());&lt;br /&gt;&lt;br /&gt;Console.WriteLine("Enter the var2:\t");&lt;br /&gt;var2=Convert.ToInt32(Console.ReadLine());&lt;br /&gt;&lt;br /&gt;Addition obj=new Addition(var1,var2);&lt;br /&gt;&lt;br /&gt;obj.addNum();&lt;br /&gt;obj.displayNum();&lt;br /&gt;Console.ReadLine();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="font-weight: bold;"&gt;Instance Constructors:&lt;br /&gt;&lt;br /&gt;&lt;ul style="font-weight: normal;"&gt;&lt;li&gt;Instance constructor is called when ever instance of a class is created. &lt;/li&gt;&lt;li&gt;These  r used to intialize data members of the class. &lt;/li&gt;&lt;li&gt;Constructors do not return any values. &lt;/li&gt;&lt;li&gt;If there r no constructors for a class, then compiler creates a default constructor for itself. &lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-2201174671623666590?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/2201174671623666590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=2201174671623666590' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/2201174671623666590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/2201174671623666590'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2009/05/constructors-and-destructors.html' title='Constructors  and Destructors'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-4213266024167463403</id><published>2009-06-16T20:38:00.000-07:00</published><updated>2009-09-14T06:53:07.943-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>S@mple Progr@ms</title><content type='html'>&lt;blockquote&gt;&lt;/blockquote&gt;/*............... Sample prog's 1.......................*/&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;&lt;br /&gt;class AgeValidation&lt;br /&gt;{&lt;br /&gt;int age;&lt;br /&gt;&lt;br /&gt;void accept()&lt;br /&gt;{&lt;br /&gt;              &lt;blockquote&gt;Console.WriteLine("Enter the Age:");&lt;br /&gt;               age=Convert.ToInt32(Console.ReadLine());&lt;/blockquote&gt;}&lt;br /&gt;void display()&lt;br /&gt;{&lt;br /&gt;&lt;blockquote&gt;if(age&lt;0)&lt;br /&gt;{&lt;br /&gt;             Console.WriteLine("Invalid age");&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;              Console.WriteLine("valid age");&lt;br /&gt;}&lt;/blockquote&gt;}&lt;br /&gt;public static void Main(String [] arg)&lt;br /&gt;{&lt;br /&gt;              AgeValidation obj=new AgeValidation();&lt;br /&gt;              obj.accept();&lt;br /&gt;              obj.display();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;/*................ end of sample prog 1...............*/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/*................sample prog 2..................*/&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;&lt;br /&gt;class MyTable&lt;br /&gt;{&lt;br /&gt;int t,i;&lt;br /&gt;void accept()&lt;br /&gt;{&lt;br /&gt;           &lt;blockquote&gt;Console.WriteLine("Enter the table number:");&lt;br /&gt;           t=Convert.ToInt32(Console.ReadLine());&lt;/blockquote&gt;}&lt;br /&gt;void show()&lt;br /&gt;{&lt;br /&gt;            &lt;blockquote&gt;for(i=1;i&gt;0;i++)&lt;br /&gt;            {&lt;br /&gt; Console.WriteLine("{0} * {1} = {2}",i,t,(i*t));&lt;br /&gt;            }&lt;/blockquote&gt;}&lt;br /&gt;&lt;br /&gt;public static void Main(string [] arg)&lt;br /&gt;{&lt;br /&gt;            &lt;blockquote&gt;MyTable obj=new MyTable();&lt;br /&gt;            obj.accept();&lt;br /&gt;            obj.show();&lt;/blockquote&gt;}&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;}&lt;br /&gt;&lt;br /&gt;/*............. End of sample prog 2............*/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-4213266024167463403?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/4213266024167463403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=4213266024167463403' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/4213266024167463403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/4213266024167463403'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2009/06/smple-progrms.html' title='S@mple Progr@ms'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-1342122930642933579</id><published>2009-02-20T00:38:00.000-08:00</published><updated>2009-09-14T06:53:26.460-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>Sw@pping of num's using reference type param.</title><content type='html'>using System;&lt;br /&gt;&lt;br /&gt;public class Swapping&lt;br /&gt;{&lt;br /&gt; void Swap(ref int a, ref int b)&lt;br /&gt;                          {&lt;br /&gt;                           int temp;&lt;br /&gt;                                                   temp=a;&lt;br /&gt;                                                   a=b;&lt;br /&gt;                                                   b=temp;&lt;br /&gt;                          &lt;br /&gt;                           }&lt;br /&gt;&lt;br /&gt;static void Main(string [] arg)&lt;br /&gt;{&lt;br /&gt;  Swapping obj=new Swapping();&lt;br /&gt; int n1,n2;&lt;br /&gt;Console.WriteLine("Enter the no's:\t");&lt;br /&gt;n1=Convert.ToInt32(Console.ReadLine());&lt;br /&gt;n2=Convert.ToInt32(Console.ReadLine());&lt;br /&gt; obj.Swap(ref n1, ref n2);&lt;br /&gt;&lt;br /&gt;Console.WriteLine("The values of the numbers before swapping is :\t"+n1);&lt;br /&gt;Console.WriteLine("The values of the numbers before swapping is :\t"+n2);&lt;br /&gt;Console.ReadLine();&lt;br /&gt;}&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-1342122930642933579?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/1342122930642933579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=1342122930642933579' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/1342122930642933579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/1342122930642933579'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2009/02/swpping-of-nums-using-reference-type.html' title='Sw@pping of num&apos;s using reference type param.'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-3022139573241696911</id><published>2009-02-19T22:03:00.000-08:00</published><updated>2009-02-19T22:55:42.163-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>Using Methods with P@rameters</title><content type='html'>As we know parameters allow information to be passed in and out of a method.&lt;br /&gt;When you define method, you can include list of parameters in parentheses.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Declaring Methods with  parameters&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Each parameter has a type and a name. u can declare parameters by placing parameter declaration inside parentheses. A syntax that is used to declare parameters is similar to the syntax that is used to declare local variables.&lt;br /&gt;&lt;br /&gt;The syntax for declaring parameters inside  methods&lt;br /&gt;&lt;blockquote&gt;void Method(int n, string y)&lt;br /&gt;         {&lt;br /&gt;              // body.&lt;br /&gt;         }&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;the preceding code declares the method (Method) with out parameters and y. The first parameter is of type int and 2nd of type string.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Calling methods with Parameters&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;value type&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;values r some time passed in parameters, therefore, the data can be transferred into the method but cannot be transferred out.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Reference type&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;These r some times called In/Out parameters, therfore, the data can be transferred into the method and out again.&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Pass Parameter by value&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;The simplest definition of a value parameter is the data type name followed by a variable name.&lt;br /&gt;When a method is called, a new storage location is created for each value parameter. The values of the corresponding expressions are copied into them. The expressions  supplied for each value parameter must be similar to the declaration of the value parameter or it must be a type that cane be implicitly converted to the value type .&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;example :&lt;br /&gt;&lt;blockquote&gt;class calculator&lt;br /&gt;{&lt;br /&gt;void Addone(int var)&lt;br /&gt;{&lt;br /&gt;var++;&lt;br /&gt;}&lt;br /&gt;public static void Main(string [] arg)&lt;br /&gt;{&lt;br /&gt;Calculator Cal=new Calculator();&lt;br /&gt;int number=6;&lt;br /&gt;cal.Addone(number);&lt;br /&gt;Console.WriteLine(number);   //.................. Display value 6 .&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-weight: bold;"&gt;pass parameter by reference &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;A reference parameter is a reference to a memory location of a data member.&lt;br /&gt;Unlike a value parameter, a reference parameter does not create a new storage location., instead reference parameters represents the same location in memory as the variable that is supplied in the method call.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;you can declare reference parameter by using the&lt;/span&gt;&lt;span style="font-style: italic;"&gt; ref &lt;/span&gt;&lt;span&gt;keyword before the data type, as shown&lt;/span&gt;&lt;span style="font-style: italic;"&gt; &lt;/span&gt;&lt;span&gt;in&lt;/span&gt;&lt;span style="font-style: italic;"&gt; &lt;/span&gt;&lt;span&gt;the following example:&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;class Calculator&lt;br /&gt;{&lt;br /&gt;void Addone(ref int var)&lt;br /&gt;{&lt;br /&gt;var++;&lt;br /&gt;}&lt;br /&gt;public static void Main(string [] arg)&lt;br /&gt;{&lt;br /&gt;Calculator obj=new Calculator();&lt;br /&gt;int number =6;&lt;br /&gt;obj.Addone(ref number);&lt;br /&gt;Console.WriteLine(number);//....................Displays value 7.&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-3022139573241696911?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/3022139573241696911/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=3022139573241696911' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/3022139573241696911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/3022139573241696911'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2009/02/using-methods-with-prameters.html' title='Using Methods with P@rameters'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-2842719715922562218</id><published>2009-02-04T08:05:00.000-08:00</published><updated>2009-02-04T08:15:40.969-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><title type='text'>Be@t the X@m Rules</title><content type='html'>Now a days kids like ..........undergo stress and tension right from a young age , thanks to fierce competition.The rat race starts from school Every one aims for the first rank.In this process, student get terribly stressed out . The most efficient way to ease out the tension is meditation .When xams  are around the corner, take fifteen minute break every two hours while studying to do deep breathing exercises.One can also  try visualization where you picture ur self in a pleasant place and breath slowly. Playing instrumental music also elps  in de stressing. Having a bath in warm water relxes the muscles and soothes the mind .Exercising for atleast 20 minutes a day is also a must for de-stressing. Here are a few study tips that worked for...:&lt;br /&gt;&lt;br /&gt;1. Get organized. Use a daily planner for study schedules.&lt;br /&gt;&lt;br /&gt;2.keep your study area organized, tidy and clutter free,it helps you think better.&lt;br /&gt;&lt;br /&gt;3. look over ur notes after classs to see if you have any questions and to mark important parts.&lt;br /&gt;&lt;br /&gt;this working style has helped me a lot at time of exams.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-2842719715922562218?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/2842719715922562218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=2842719715922562218' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/2842719715922562218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/2842719715922562218'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2009/02/bet-xm-rules.html' title='Be@t the X@m Rules'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-5692929113936833514</id><published>2009-01-18T07:49:00.000-08:00</published><updated>2009-02-19T20:27:13.375-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'></title><content type='html'>/*..................Printing student info ......................*/&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;&lt;br /&gt;class Student&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;//Member data.&lt;br /&gt;string name;&lt;br /&gt;string regno;&lt;br /&gt;string add;&lt;br /&gt;int age;&lt;br /&gt;&lt;br /&gt;//Member function&lt;br /&gt;void Accept()&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("Enter the name:\t");&lt;br /&gt;name=Console.ReadLine();&lt;br /&gt;&lt;br /&gt;Console.WriteLine("Enter the regno:\t");&lt;br /&gt;regno=Console.ReadLine();&lt;br /&gt;&lt;br /&gt;Console.WriteLine("Enter the address:\t");&lt;br /&gt;add=Console.ReadLine();&lt;br /&gt;&lt;br /&gt;Console.WriteLine("Enter the age :\t");&lt;br /&gt;age=Convert.ToInt32(Console.ReadLine());&lt;br /&gt;}&lt;br /&gt;void Display()&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("The name of student is :{0}",name);&lt;br /&gt;Console.WriteLine("The regno of student is :{0}",regno);&lt;br /&gt;Console.WriteLine("The age of student is :{0}",age);&lt;br /&gt;Console.WriteLine("The add of student is :{0}",add);&lt;br /&gt;}&lt;br /&gt;public static void Main(string [] arg)&lt;br /&gt;{&lt;br /&gt;Student S=new Student();&lt;br /&gt;S.Accept();&lt;br /&gt;S.Display();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/*...................Fibonacci series.................*/&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;&lt;br /&gt;class Fibonacci&lt;br /&gt;{&lt;br /&gt;int f[] =new int[15];&lt;br /&gt;&lt;br /&gt;void Accept()&lt;br /&gt;{&lt;br /&gt;f[0]=0;&lt;br /&gt;f[1]=1;&lt;br /&gt;Console.WriteLine("Enter the num:\t");&lt;br /&gt;int num=Convert.ToInt32(Console.ReadLine());&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void Display()&lt;br /&gt;{&lt;br /&gt;for(int i=2;i&lt;=num;i++)&lt;br /&gt;{&lt;br /&gt;f[i]=f[i-1]+f[i-2];&lt;br /&gt;Console.WriteLine(f[i]);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;class Result&lt;br /&gt;{&lt;br /&gt;public static void Main(string [] arg)&lt;br /&gt;{&lt;br /&gt;Fibonacci F=new Fibonacci();&lt;br /&gt;F.Accept();&lt;br /&gt;F.Display();&lt;br /&gt;}&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-5692929113936833514?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/5692929113936833514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=5692929113936833514' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/5692929113936833514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/5692929113936833514'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2009/01/exmple-progrms.html' title=''/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-458087615410059100</id><published>2009-01-17T04:52:00.001-08:00</published><updated>2009-01-22T05:21:15.541-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>Using Methods in C#</title><content type='html'>&lt;blockquote&gt;&lt;/blockquote&gt;Before coming to methods and there types first we shall know what r the features of &lt;span style="font-style: italic;"&gt;Methods&lt;/span&gt;....&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Method is a set of one or more statements or instructions.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Methods r mainly used for data hiding (i.e) providing the facility of encapsulation and also abstraction.&lt;/li&gt;&lt;li&gt;They allow the user to implement the concept of &lt;span style="font-style: italic;"&gt;reusability .&lt;/span&gt;&lt;/li&gt;&lt;li&gt;They play a key role in modular programming  &lt;span style="font-style: italic;"&gt;,&lt;/span&gt;when a application is divided into methods then it ill be easy to maintain the code and also to debug.&lt;/li&gt;&lt;li&gt;Methods r used for performing repetitive tasks such as &lt;span style="font-style: italic;"&gt;fetching specific records and text&lt;/span&gt;. They allow user to break an application into discrete logical units, which makes the application more readable.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;We can reuse the code written in a method and can be executed any number of times by calling methods with little change or else no change .&lt;/li&gt;&lt;/ul&gt;To use methods, you need to perform 2 things mainly&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Define method.&lt;/li&gt;&lt;li&gt;Call method.&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;Defining methods&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;defining a method means declaring the elements of its structure. methods r defined with the following syntax......&lt;blockquote&gt;&lt;access&gt; &lt;return&gt; &lt;mtd&gt;(para list)&lt;br /&gt;{&lt;br /&gt;//................Method body;&lt;br /&gt;}&lt;/mtd&gt;&lt;/return&gt;&lt;/access&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Access specifier:&lt;/span&gt;&lt;blockquote&gt;This explains the extent to which a variable and mtd can be accessed.&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Return type:&lt;blockquote&gt;A method can return any type of value, if method does not return any value then use void as the return type.&lt;/blockquote&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Method name:&lt;blockquote&gt;This plays a prominent role in shaping a class. Method names can not be keywords of the programming language and it is a good practice to  follow  follow pascal case (eg: Methodone). It can not be same as a variable name also .&lt;/blockquote&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Parameter list:&lt;/span&gt;&lt;blockquote&gt;This is used to receive and pass the data from one method to other. We can leave the parameter list empty with out any values.&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Method body:&lt;/span&gt;&lt;blockquote&gt;Method body mainly contains the code which is required to perform some specific operation.&lt;/blockquote&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-style: italic;"&gt;example:&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;class Calculator&lt;br /&gt;{&lt;br /&gt;public int AddNumber(int n1, int n2)&lt;br /&gt;{&lt;br /&gt;int res;&lt;br /&gt;res=n1+n2;&lt;br /&gt;return res;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Types of Methods&lt;/span&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;calling Methods&lt;/span&gt;&lt;blockquote&gt;After defining a method , you can use it by its name. The method name is followed by parentheses even if the method call has no parameters.&lt;br /&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;/ul&gt;example:&lt;blockquote&gt;using System;&lt;br /&gt;&lt;br /&gt;class Calculator&lt;br /&gt;{&lt;br /&gt;public int AddNumber(int n1, int n2)&lt;br /&gt;{&lt;br /&gt;int res;&lt;br /&gt;res=n1+n2;&lt;br /&gt;return res;&lt;br /&gt;}&lt;br /&gt;static void Main(string [] arg)&lt;br /&gt;{&lt;br /&gt;Calculator C=new Calculator();&lt;br /&gt;int total=C.AddNumber(10,20);&lt;br /&gt;Console.WriteLine("Te result is :{0}",total);&lt;br /&gt;Console.ReadLine();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;Execution process: &lt;ul&gt;&lt;li&gt;In the above program the execution starts from main function . so initially memory is allocated dynamically for the Calculator class and a object is created. &lt;/li&gt;&lt;li&gt;Nw by using the object we r trying to access the code defined inside the method. When the method (AddNumber) is accessed the actual arguments(10, 20) supplied in the method is passed to the formal parameters(int n1,int n2) and these values r stored in n1 and n2.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;since the method uses a return type as int, it is the duty of the user to return a value of type int . so after performing the addition operation the data is returned and the returned value is caught by a variable (total) which is in main function.&lt;/li&gt;&lt;li&gt;Last but not the least.............. The value is printed.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Here We have to remember one thing that return type of the main method is 'void ' so it doesnt return any value.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-style: italic;"&gt;example:&lt;/span&gt;&lt;br /&gt;/*.................. Recursion method...............*/&lt;blockquote&gt;&lt;blockquote&gt;using System;&lt;br /&gt;&lt;br /&gt;class Number&lt;br /&gt;{&lt;br /&gt;public int Factorial(int n)&lt;br /&gt;{&lt;br /&gt;int res;&lt;br /&gt;if(n==1)&lt;br /&gt;return 1;&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;res=factorial(n-1)*n;&lt;br /&gt;return res;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;}&lt;br /&gt;static void Main(string [] arg)&lt;br /&gt;{&lt;br /&gt;Number obj=new Number();&lt;br /&gt;Console.WriteLine("Factorial of 3 is "+obj.factorial(3));&lt;br /&gt;Console.WriteLine("Factorial of 4 is "+obj.factorial(4));&lt;br /&gt;Console.WriteLine("Factorial of 5 is "+obj.factorial(5));&lt;br /&gt;Console.ReadLine();&lt;br /&gt;}&lt;br /&gt;}&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;In above program, the factorial() method is recursive method. If the value entered by the used is not 1, this method will call itself.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-458087615410059100?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/458087615410059100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=458087615410059100' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/458087615410059100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/458087615410059100'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2009/01/using-methods-in-c.html' title='Using Methods in C#'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-174390827584946088</id><published>2009-01-17T04:27:00.000-08:00</published><updated>2009-01-17T05:08:03.096-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>Example for using access specifiers in C#</title><content type='html'>/*.............. Progr@m to calculate area of rectangle and square.........*/&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;&lt;br /&gt;class Area&lt;br /&gt;{&lt;br /&gt;static int res;//.............declaring static variable.&lt;br /&gt;&lt;br /&gt;public static void RecArea()//........... defining a static func.&lt;br /&gt;{&lt;br /&gt;int l, b;&lt;br /&gt;&lt;br /&gt;Console.WriteLine("Enter the length :\t");&lt;br /&gt;l=Convert.ToInt32(Console.ReadLine());&lt;br /&gt;&lt;br /&gt;Console.WriteLine("Enter the breadth :\t");&lt;br /&gt;b=Convert.ToInt32(Console.ReadLine());&lt;br /&gt;&lt;br /&gt;res=l*b;&lt;br /&gt;Console.WriteLine("The area of a rectangle is :{0}",res);&lt;br /&gt;&lt;br /&gt;// (or)  Console.WriteLine("The area of rectangle is :\t"+res);&lt;br /&gt;}&lt;br /&gt;public static void SqrArea()//........... defining a static func.&lt;br /&gt;{&lt;br /&gt;int side;&lt;br /&gt;&lt;br /&gt;Console.WriteLine("Enter the side of the square:\t");&lt;br /&gt;side=Convert.ToInt32(Console.ReadLine());&lt;br /&gt;&lt;br /&gt;res=side*side;&lt;br /&gt;Console.WriteLine("The area of a square is :{0}",res);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;class Result&lt;br /&gt;{&lt;br /&gt;public static void Main(string [] arg)&lt;br /&gt;{&lt;br /&gt;int option;&lt;br /&gt;Area a=new Area();&lt;br /&gt;&lt;br /&gt;Console.WriteLine("Main Menu");&lt;br /&gt;Console.WriteLine("1. Area of Rectangle ");&lt;br /&gt;Console.WriteLine("2. Area of Square ");&lt;br /&gt;Console.WriteLine("Enter the option :\t");&lt;br /&gt;option=Convert.ToInt32(Console.ReadLine());&lt;br /&gt;&lt;br /&gt;switch(option)&lt;br /&gt;{&lt;br /&gt;case 1:&lt;blockquote&gt;a.RecArea();&lt;br /&gt;break;&lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;case 2:&lt;blockquote&gt;a.SqrArea();&lt;br /&gt;break;&lt;br /&gt;&lt;/blockquote&gt;default:&lt;blockquote&gt;Console.WriteLine("oops..!.............Wrong choice buddy, u can leave ");&lt;br /&gt;break;&lt;br /&gt;&lt;/blockquote&gt;}&lt;br /&gt;Console.ReadLine();&lt;br /&gt;}&lt;br /&gt;}             &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Note:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;steps to compile and execute&lt;br /&gt;&lt;ol&gt;&lt;li&gt;save teh file with .cs extension (i.e)  Area.cs &lt;/li&gt;&lt;li&gt;compilation:&lt;blockquote&gt;csc Area.cs&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;execution: &lt;blockquote&gt;Area.cs (or) Area.exe&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-174390827584946088?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/174390827584946088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=174390827584946088' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/174390827584946088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/174390827584946088'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2009/01/example-for-using-access-specifiers-in.html' title='Example for using access specifiers in C#'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-637285027832606970</id><published>2009-01-14T20:33:00.000-08:00</published><updated>2009-01-15T01:21:47.666-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>Access specifiers</title><content type='html'>Access specifier defines the scope of a class member. We generally use these access specifiers to give complete security to the data . We use different type of access specifiers to specify the extent of visibility of a class member.  In C# we use totally 5 types of access specifiers&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;public&lt;br /&gt;&lt;/li&gt;&lt;li&gt;private&lt;br /&gt;&lt;/li&gt;&lt;li&gt;protected&lt;/li&gt;&lt;li&gt;internal&lt;/li&gt;&lt;li&gt;protected internal&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;public access specifier&lt;/span&gt;&lt;blockquote&gt;&lt;ol&gt;&lt;li&gt;This access specifier allows the member data and functions of a class to be exposed to other class functions and objects .&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The member which is declared as public can be accessed from outside the class.&lt;/li&gt;&lt;/ol&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;      example:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;&lt;br /&gt;class Car&lt;br /&gt;{&lt;br /&gt;private string Car_color;&lt;br /&gt;}&lt;br /&gt;class Bike&lt;br /&gt;{&lt;br /&gt;public string bike_color;&lt;br /&gt;}&lt;br /&gt;class Result&lt;br /&gt;{&lt;br /&gt;static void Main(string [] arg)&lt;br /&gt;{&lt;br /&gt;Car Camry=new Car();&lt;br /&gt;Bike unicorn=new Bike():&lt;br /&gt;&lt;br /&gt;Camry.Car_color="white"; //.................................. Error..! cant access private var outside class.&lt;br /&gt;unicorn.bike_color="black"; //................................assigns black to variable.&lt;br /&gt;Console.ReadLine();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;example 2:&lt;/span&gt;&lt;br /&gt;using System;&lt;br /&gt;class Car&lt;br /&gt;{&lt;br /&gt;public string color;&lt;br /&gt;public void Honk()&lt;br /&gt;{&lt;br /&gt;Console.WriteLine(" Member function invoked");&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;class Result&lt;br /&gt;{&lt;br /&gt;static void Main(string [] arg)&lt;br /&gt;{&lt;br /&gt;car Camry =new Car();&lt;br /&gt;Camry.Honk();//.............. displays the msg.........................Member function invoked.&lt;br /&gt;Console.ReadLine();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;private access specifier &lt;/span&gt;&lt;blockquote&gt;&lt;ol&gt;&lt;li&gt;This access specifier allows  the private data of a class to be hidden from out side classes.  &lt;/li&gt;&lt;li&gt;Only  the members of the same class r provided permissions to access the private members.&lt;/li&gt;&lt;/ol&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;example: &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;&lt;br /&gt;class Car&lt;br /&gt;{&lt;br /&gt;private string Model;&lt;br /&gt;&lt;br /&gt;void Honk()&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("beep beep....!");&lt;br /&gt;}&lt;br /&gt;public void setModel&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("Enter the model num:\t");&lt;br /&gt;Model=Console.ReadLine();&lt;br /&gt;}&lt;br /&gt;public void Display()&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("The model is :\t");&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;class Result&lt;br /&gt;{&lt;br /&gt;static int Main(string [] arg)&lt;br /&gt;{&lt;br /&gt;Car Camry=new Car();&lt;br /&gt;&lt;br /&gt;Camry.setModel(); //..................Prompts user to enter the model..&lt;br /&gt;Camry.Display();//...............Displays the model.&lt;br /&gt;Camry.Honk();// ................. &lt;span style="font-weight: bold;"&gt;can not access private methods out side class&lt;/span&gt;.&lt;br /&gt;Console.WriteLine(Camry.Model);//...............&lt;span style="font-weight: bold;"&gt;can not access private mem outside class.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;return 0;&lt;br /&gt;Console.ReadLine();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Note:&lt;/span&gt;&lt;blockquote&gt;When u do not specify any data members as either public, private, protected then the  default access specifier is &lt;span style="font-style: italic;"&gt;private.&lt;/span&gt;&lt;/blockquote&gt;&lt;ul style="font-style: italic;"&gt;&lt;li&gt;Protected access specifier:&lt;blockquote&gt;&lt;ol&gt;&lt;li&gt;This specifier allows a class to expose its member data and functions only to its child classes . &lt;/li&gt;&lt;li&gt;It hides the data to be accessed from other class objects and functions.&lt;/li&gt;&lt;/ol&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;example&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;class Car&lt;br /&gt;{&lt;br /&gt;protected string model;&lt;br /&gt;void Method()&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("Member function invoked");&lt;br /&gt;}&lt;br /&gt;public void setModel()&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("Enter the model name :\t");&lt;br /&gt;model=Console.ReadLine();&lt;br /&gt;}&lt;br /&gt;void Display()&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("The model is :\t");&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;class Result&lt;br /&gt;{&lt;br /&gt;static int Main(string []  arg)&lt;br /&gt;{&lt;br /&gt;Car civic =new Car();&lt;br /&gt;civic.Method();//......... &lt;span style="font-weight: bold;"&gt;Error!...can not access this member as it is a protected member.&lt;/span&gt;&lt;br /&gt;civic.setModel();//....... accepts the input.&lt;br /&gt;civic.Display();//.......Error!...private member can not be accessed.&lt;br /&gt;Console.WriteLine(civic.model);//.....&lt;span style="font-weight: bold;"&gt;protected members can not be accessed.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;return 0;&lt;br /&gt;Console.ReadLine();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;internal access specifier&lt;/span&gt;:&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;&lt;blockquote&gt;Any member that is declared internal can be accessed from any class or method defined within an application in which the member is defined.&lt;/blockquote&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;&lt;blockquote&gt;When u do not specify any class class as either public, private, protected then the default access specifier for a class is &lt;span style="font-weight: bold;"&gt;internal&lt;/span&gt;.&lt;/blockquote&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;example:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;class Bike&lt;br /&gt;{&lt;br /&gt;private string col;&lt;br /&gt;&lt;br /&gt;internal void Method()&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("Method invoked");&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;class Result&lt;br /&gt;{&lt;br /&gt;static void Main(string[] arg)&lt;br /&gt;{&lt;br /&gt;Bike Fz=new Bike();&lt;br /&gt;Console.WriteLine(Fz.col);//...........Error!...can not access private data.&lt;br /&gt;Fz.Method();//............Displays method invoked.&lt;br /&gt;Console.ReadLine();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Note:&lt;blockquote&gt;&lt;/blockquote&gt;&lt;/span&gt;the main difference between &lt;span style="font-weight: bold;"&gt;public&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;internal&lt;/span&gt; is&lt;br /&gt;&lt;ol&gt;&lt;li&gt;public is visible to objects of other class outside the namespace collection and also to the child classes outside the namespace collection.&lt;/li&gt;&lt;li&gt;But internal access specifier is not visible to objects of other class outside the namespace collection and also to the child classes outside the namespace collection.&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;protected internal access specifier:&lt;/span&gt;&lt;blockquote&gt;&lt;ol&gt;&lt;li&gt;This specifier allows a class to hide its mem var, mem funct, to be accessed from other class objects  and functions, except the child class ,within the application.&lt;/li&gt;&lt;li&gt;This access specifier ecomes important while implementing inheritance.&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;example&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;&lt;br /&gt;class Car&lt;br /&gt;{&lt;br /&gt;protected internal string col;&lt;br /&gt;void Method()&lt;br /&gt;{&lt;br /&gt;Console.WriteLine(" Method invoked");&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;class Result&lt;br /&gt;{&lt;br /&gt;static int Main(string [] arg)&lt;br /&gt;{&lt;br /&gt;Car audi =mew Car();&lt;br /&gt;audi.Method();//........Error!... private function.&lt;br /&gt;Console.WriteLine(audi.col);//......&lt;span style="font-weight: bold;"&gt; cannot access protected internal members outside the class .&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;return 0;&lt;br /&gt;Console.ReadLine();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;ol&gt;&lt;li&gt;this Acc.Spec  has the similar properties as that of &lt;span style="font-style: italic;"&gt;internal &lt;/span&gt;and the only dfference is that it can not be visible to objects of other class within the same namespace.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-637285027832606970?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/637285027832606970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=637285027832606970' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/637285027832606970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/637285027832606970'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2009/01/access-specifiers.html' title='Access specifiers'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-76624996939092683</id><published>2009-01-04T04:49:00.000-08:00</published><updated>2009-01-15T01:23:32.314-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>Concepts of Object Oriented Programming</title><content type='html'>&lt;span style="font-style: italic;"&gt;&lt;/span&gt;Object Oriented Programming mainly deals with concepts such as Abstraction, Encapsulation, Polymorphism, Inheritance.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;Abstraction:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Abstraction mainly involves extraction of only relevant information. &lt;/li&gt;&lt;li&gt;The concepts of abstraction and encapsulation mainly deals with the member functions of the class. &lt;/li&gt;&lt;li&gt;abstraction can be explained in other words as ' &lt;span style="font-style: italic;"&gt;Looking for what u want&lt;/span&gt; ' in an object or a class.&lt;/li&gt;&lt;li&gt;after reading this summary of abstratcion one gets a doubt " does abstraction mean that information is unavailable" .....! No, It means that all the information exists, but only the relevant information is provided to the user.&lt;/li&gt;&lt;li&gt;we shall learn more abt abstraction by considering the below given example...&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;example:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Anautomobile salesperson is aware that different people have different preferences. Some r intrested in the mileage of the car, some in its price, some in its engine, and some in its style.&lt;br /&gt;&lt;br /&gt;So every individual have diffferent views and wants . Although every individual is intrested in diff aspects of the car finally tey all come to the category of buying a car. The sales man knows the details of the car , but he presents only the relevant information to potential to the customer. As a result, the salesman practices abstraction and presents only relevant details to customer.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;Encapsulation&lt;/span&gt;:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Encapsulation means packing of one or more components together. &lt;/li&gt;&lt;li&gt;It short encapsulation means ' to enclose it or as if in a capsule' . &lt;/li&gt;&lt;li&gt;Encapsulation can be defined as " the process of enclosing one or more items within a physical or logical package ", it involves preventing access to non-essential data.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;example:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When you plug in the cord of a vacuum cleaner and turn on the switch, the vacuum cleaner starts. You do not see the complex process needed to actually convert electricity into suction power. In other words , the exact working of the cleaner has been encapsulated. Therefore, encapsulation is also explained as information hiding or data hiding because it involves hiding many of the important details of an object from the user.&lt;br /&gt;&lt;br /&gt;Abstraction and encapsulation are realated features. abstraction enables you to make relevant information visible. Encapsulation enables you to package information to impent the desired level of abstaraction. Therefore,  encapsulation assists abstraction by providing a means of suppressing the non essential details.&lt;br /&gt;the feature of encapsulation is achieved by access specifiers............&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-76624996939092683?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/76624996939092683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=76624996939092683' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/76624996939092683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/76624996939092683'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2009/01/concepts-of-object-oriented-programming.html' title='Concepts of Object Oriented Programming'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-4715100139274775248</id><published>2008-12-31T21:38:00.000-08:00</published><updated>2008-12-31T21:49:01.498-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>Quiz questions</title><content type='html'>1. static void main(String [] arg)&lt;br /&gt;{&lt;br /&gt;char ch;&lt;br /&gt;Console.WriteLine("Enter the character:\t");&lt;br /&gt;ch=Convert.ToChar(Console.ReadLine());&lt;br /&gt;&lt;br /&gt;if(ch=='U')&lt;br /&gt;Console.Writeline("The character is X");&lt;br /&gt;else&lt;br /&gt;Console.WriteLine("The char is not X");&lt;br /&gt;Console.ReadLine();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;wats the o/p of the above code .............................?&lt;br /&gt;&lt;br /&gt;2.  To which category   does the operator ++, = belong.........?&lt;br /&gt;&lt;br /&gt;3. In the statement using System, System is a.........................&lt;br /&gt;&lt;br /&gt;4. which of the following data type is not a value type.............?&lt;br /&gt;&lt;ul&gt;&lt;li&gt;char&lt;/li&gt;&lt;li&gt;int&lt;/li&gt;&lt;li&gt;float&lt;/li&gt;&lt;li&gt;string&lt;/li&gt;&lt;/ul&gt;5.The .............. compiler is used for C#.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;cc&lt;/li&gt;&lt;li&gt;csc&lt;/li&gt;&lt;li&gt;cs&lt;/li&gt;&lt;/ul&gt;6.In which of the following datatypes does the Console.readLine() function accept a value.........?&lt;br /&gt;&lt;ul&gt;&lt;li&gt;int&lt;br /&gt;&lt;/li&gt;&lt;li&gt;float&lt;/li&gt;&lt;li&gt;bool&lt;/li&gt;&lt;li&gt;string&lt;/li&gt;&lt;/ul&gt;7. Console is a ..........&lt;br /&gt;&lt;ul&gt;&lt;li&gt;class&lt;/li&gt;&lt;li&gt;function&lt;/li&gt;&lt;li&gt;namespace&lt;/li&gt;&lt;/ul&gt;8.In any program, the execution of the program starts from ........&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Note:&lt;/span&gt;&lt;br /&gt;Give the answers by there respective question numbers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-4715100139274775248?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/4715100139274775248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=4715100139274775248' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/4715100139274775248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/4715100139274775248'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2008/12/quiz-questions.html' title='Quiz questions'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-699883726921225054</id><published>2008-12-31T21:16:00.000-08:00</published><updated>2008-12-31T21:36:51.908-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>Break @nd Continue st@tements</title><content type='html'>Some times we need to exit out of the loop with out performing next iteration. SO in such case we make use of break and continue statements.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Break statement:&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;break statement is used in order to exit from the loop.&lt;/li&gt;&lt;li&gt;It Terminates a statement sequence in a switch statement.&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-style: italic;"&gt;Continue statement&lt;/span&gt;:&lt;br /&gt;&lt;ol&gt;&lt;li&gt; Used to skip all the subsequent instructions and shift the cursor position back to the loop.&lt;/li&gt;&lt;li&gt;Here the compiler tries to iterate the loop when ever the condition is  satisfied .&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-style: italic;"&gt;Example:&lt;/span&gt;&lt;br /&gt;      /*....................... sum of +ve numbers..........................*/&lt;br /&gt;using System;&lt;br /&gt;&lt;br /&gt;class Break_Continue&lt;br /&gt;{&lt;br /&gt;static void Main(string [] arg)&lt;br /&gt;{&lt;br /&gt;int num,sum,i;&lt;br /&gt;for(sum=num=i=0;i&lt;5;i++)&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("Enter the +ve number:\t");&lt;br /&gt;num=Convert.ToInt32(Console.ReadLine());&lt;br /&gt;&lt;br /&gt;if(num&lt;=0)                                      //............checks for +ve numbers.&lt;br /&gt;continue;&lt;br /&gt;sum=sum+num;                             //..............adds only +ve numbers.&lt;br /&gt;}&lt;br /&gt;Console.WriteLine("The sum of +ve numbers:\t"+sum); //..... Displays result of +ve numbers.&lt;br /&gt;}&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-699883726921225054?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/699883726921225054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=699883726921225054' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/699883726921225054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/699883726921225054'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2008/12/break-nd-continue-sttements.html' title='Break @nd Continue st@tements'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-6248131622625541890</id><published>2008-12-29T06:24:00.000-08:00</published><updated>2008-12-31T21:37:15.961-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>Program to create Fibonacci series</title><content type='html'>using System;&lt;br /&gt;&lt;br /&gt;class Fibonacci&lt;br /&gt;{&lt;br /&gt;public static void Main(string [] arg)&lt;br /&gt;{&lt;br /&gt;int num;&lt;br /&gt;int f[] =new int[15];&lt;br /&gt;Fibonacci()&lt;br /&gt;{&lt;br /&gt;f[0]=1;&lt;br /&gt;f[1]=1;&lt;br /&gt;}&lt;br /&gt;void accept()&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("Enter the number :\t");&lt;br /&gt;num =Convert.ToInt32(Console.ReadLine());&lt;br /&gt;}&lt;br /&gt;for(int i=2; i&lt;=num;i++) { f[i]=f[i-1]+f[i-2]; Console.WriteLine(f[i]); } } }   &lt;span style="font-weight: bold; font-style: italic;"&gt;Note:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When u write a program using C sharp u have to save the file with ' .cs' extension.&lt;br /&gt;&lt;br /&gt;example:  Fibonacci.cs&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;compilation mtd&lt;/span&gt;:  csc Fibonacci.cs&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;execution mtd&lt;/span&gt;:  Fibonacci.cs&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-6248131622625541890?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/6248131622625541890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=6248131622625541890' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/6248131622625541890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/6248131622625541890'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2008/12/program-to-create-fibonacci-series.html' title='Program to create Fibonacci series'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-8346110643074183258</id><published>2008-12-25T00:45:00.000-08:00</published><updated>2008-12-28T03:45:45.462-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>Loop Constructs in C#</title><content type='html'>We have three types of loop constructs&lt;br /&gt;1. while.&lt;br /&gt;2. do...while .&lt;br /&gt;3. for.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;while loop &lt;/span&gt;&lt;ol&gt;&lt;li&gt;This construct is generally used to execute a block of statements for a definite number of times, depending on the condition. &lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;while&lt;/span&gt; statements checks the condition before executing the statements within the loop.&lt;/li&gt;&lt;li&gt; When the execution reaches the last line of the block the control is transferred to the condition of while and if the condition is satisfied then the statements are executed again and when the condition sets to false it comes out the loop.&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;syntax&lt;/span&gt;:&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;while(expression)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;statements;&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;do..while loop&lt;/li&gt;&lt;/ul&gt;                   1. Both Iterate until the specified loop condition becomes false.&lt;br /&gt;                 2. however, in do...while loop , the body of the loop is executed at least once and the                         condition is checked for next subsequent iterations.&lt;br /&gt;                 3. The do...while loop construct is similar to the while loop constructs.&lt;br /&gt;         &lt;br /&gt;&lt;span style="font-style: italic;"&gt;syntax:&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;do&lt;br /&gt;{&lt;br /&gt;statements;&lt;br /&gt;}while(expression);&lt;/blockquote&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;example:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;int var=10;&lt;br /&gt;do&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("value of var is :{0}",var);&lt;br /&gt;var=var+10;&lt;br /&gt;}&lt;br /&gt;while(var&lt;20);&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;for loop&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol&gt;&lt;li&gt;for loop is used to execute a block of statements for a specific number of times.&lt;/li&gt;&lt;li&gt;Here the main difference between for and while is mainly in syntactical format. The syntax used for loop is ......&lt;/li&gt;&lt;/ol&gt;Syntax:&lt;br /&gt;&lt;blockquote&gt;for(initialization; condition; increment/decrement)&lt;br /&gt;{&lt;br /&gt;statements;&lt;br /&gt;}&lt;/blockquote&gt;&lt;span style="font-style: italic;"&gt;example:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;for(int i=1;i&lt;=10;i++) {  Console.WriteLine("{0}",i); }&lt;/blockquote&gt;&lt;span style="font-style: italic;"&gt;Note&lt;/span&gt;:&lt;br /&gt;We can follow different syntax's for &lt;span style="font-style: italic;"&gt;for loop&lt;blockquote&gt;for(; ;)&lt;br /&gt;{&lt;br /&gt;statements;&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;/blockquote&gt; &lt;blockquote&gt;&lt;/blockquote&gt;&lt;ol&gt;&lt;/ol&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;/ul&gt;&lt;ul&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-8346110643074183258?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/8346110643074183258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=8346110643074183258' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/8346110643074183258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/8346110643074183258'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2008/12/loop-constructs-in-c.html' title='Loop Constructs in C#'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-8219204769597896116</id><published>2008-12-20T23:43:00.000-08:00</published><updated>2008-12-21T08:16:39.363-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>Conditional Constructs</title><content type='html'>Conditional constructs are used to control the flow of program . conditional constructs allow the flow selective execution of statements , depending on the value of the expressions associated with them. The comparison operators are required for evaluating the conditions . various conditional constructs are :&lt;br /&gt;&lt;br /&gt;1. if....else construct.&lt;br /&gt;2. switch... case construct.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;if....else construct &lt;blockquote style="font-style: italic;"&gt;if...else conditional construct is followed by a logical expression where data is compared and a decision is made on the basis of the result of the comparison. syntax is&lt;br /&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;/ul&gt;                                        if (expression)&lt;br /&gt;                                  {&lt;br /&gt;                                                     statements;&lt;br /&gt;                                   }&lt;br /&gt;                                    else&lt;br /&gt;                                    {&lt;br /&gt;                                                       statements;&lt;br /&gt;                                     }&lt;br /&gt;&lt;span style="font-style: italic;"&gt; &lt;span style="font-weight: bold;"&gt;example&lt;/span&gt;:&lt;/span&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;br /&gt;class Number&lt;br /&gt;{&lt;br /&gt;static void Main(string [] arg)&lt;br /&gt;{&lt;br /&gt;int num;&lt;br /&gt;&lt;br /&gt;Console.WriteLine("Enter the number: \t");&lt;br /&gt;num=Convert.ToInt32(Console.ReadLine());&lt;br /&gt;&lt;br /&gt;if(num%!=0)&lt;br /&gt;{&lt;br /&gt;Console.WriteLine(" Number is odd");&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;Console.WriteLine(" Number is even");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if....else constructs can be nested inside each other. This process of  using multiple if....else constructs is known as &lt;span style="font-style: italic;"&gt;cascading if ...else&lt;/span&gt;. consider the example :&lt;blockquote&gt;int n1=5;&lt;br /&gt;int n2=6;&lt;br /&gt;int n3=7;&lt;br /&gt;if(n1&gt;n2)&lt;br /&gt;if(n1&gt;n3)&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("Number 1 is great");&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("number 3 is great");&lt;br /&gt;}&lt;br /&gt;else if(n2&gt;n3)&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("number 2 is great");&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("number 3 is great");&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;switch...case construct&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;This construct is used when there are multiple values for a single variable. syntax for this construct is&lt;br /&gt;&lt;blockquote&gt;switch(variable name)&lt;br /&gt;{&lt;br /&gt;           case option:   statement;&lt;br /&gt;                                   break;&lt;br /&gt;           case option:   statement;&lt;br /&gt;                                   break;&lt;br /&gt;           default:  statement;&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-8219204769597896116?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/8219204769597896116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=8219204769597896116' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/8219204769597896116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/8219204769597896116'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2008/12/conditional-constructs.html' title='Conditional Constructs'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-2522294487961041155</id><published>2008-12-15T09:36:00.001-08:00</published><updated>2008-12-15T10:17:39.373-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>Operators  in  C#</title><content type='html'>"&lt;span style="font-weight: bold;"&gt;Operators&lt;/span&gt; r the ones which r used to perform different operations on atleast one operand".&lt;br /&gt;&lt;br /&gt;Operators r mainly classified into 5 types&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Arithmetic operators&lt;/li&gt;&lt;li&gt;Arithmetic assignment operators&lt;/li&gt;&lt;li&gt;unary operators&lt;/li&gt;&lt;li&gt;comparison operators&lt;/li&gt;&lt;li&gt;Logical operators&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;1. &lt;span style="font-weight: bold;"&gt;Arithmetic operator&lt;/span&gt;:&lt;blockquote&gt;&lt;/blockquote&gt;These operators r used in order to perform operations on atleast two operands i.e variables. We can perform operations such as addition(+) ,subtraction(-), multiplication(*), division(/), modulo(%).&lt;br /&gt;&lt;br /&gt;2. &lt;span style="font-weight: bold;"&gt;Arithmetic assignment operator&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;These operators r used in order to perform assignment operations to assign  values  to variables (operands).We can perform Operations such as ( +=, -=, *=, /=, %= ) . We shall understand them with examples&lt;br /&gt;&lt;ul&gt;&lt;li&gt;+= :-  x+=y it implies x=x+y;&lt;/li&gt;&lt;li&gt;*=  :-  x*=y  it implies x=x*y;&lt;/li&gt;&lt;/ul&gt;3. &lt;span style="font-weight: bold;"&gt; Unary operators&lt;/span&gt;:&lt;br /&gt;             &lt;br /&gt;These operators use only single operand. These r mainly used for incrementing and decrementing the value present at the variable. these incrementation  process includes mainly post and pre process. we shall see examples,&lt;br /&gt;&lt;ul&gt;&lt;li&gt;++  which is used as ++x where x is the operand and this is called pre incrementation. where the value is assigned after getting incremented . and if we use the operator like x++ then it is called post increment . and the case is similar with decrement process.&lt;/li&gt;&lt;li&gt;-- is used for decrementation process . the pre and post decrementations r done similar to that of incrementation  process.&lt;/li&gt;&lt;/ul&gt;4&lt;span style="font-weight: bold;"&gt;. Comparison operators&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;These operators r used  to  compare two values and perform the required action.when ever u use a comparison operator the expression results a boolean value (true or false) .&lt;br /&gt;Comparison operators are ( &lt;, &gt;, &lt;=, &gt;=, !=, ==) .These r used in between two expressions .&lt;br /&gt;&lt;br /&gt;5. &lt;span style="font-weight: bold;"&gt;Logical operators&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;These r used to evaluate a expression and return a boolean value . the logical operators includes (&amp;amp;&amp;amp;,  !,  ||, ^).&lt;br /&gt;&lt;br /&gt;6. &lt;span style="font-weight: bold;"&gt;Terenary operator (or) conditional operator:&lt;/span&gt; this operator is used to perform an action based on the result that is generated.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;syntax&lt;/span&gt;: &lt;blockquote&gt;expr1? expr2 : expr3&lt;br /&gt;&lt;br /&gt;here if expr1 is true then expr2 is printed if it is false then expr3 is printed. In general expr1 contains statements regarding comparison of values  present at the operands  .&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-2522294487961041155?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/2522294487961041155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=2522294487961041155' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/2522294487961041155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/2522294487961041155'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2008/12/operators-in-c.html' title='Operators  in  C#'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-6958352889430207786</id><published>2008-12-15T09:10:00.000-08:00</published><updated>2008-12-15T10:17:39.373-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>Ex@mples of   C#  programming</title><content type='html'>/*     Example One   */&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;class Myclass&lt;br /&gt;{&lt;br /&gt;           public static void Main(String arg[])&lt;br /&gt;           {&lt;br /&gt;                        string add='A';&lt;br /&gt;                        string Response_code="007";&lt;br /&gt;                        int counter=60;&lt;br /&gt;Console.WriteLine(add);&lt;br /&gt;Console.WriteLine(Responce_code);&lt;br /&gt;Console.WriteLine(counter);&lt;br /&gt;           }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;output:&lt;br /&gt;&lt;br /&gt;fnds can u guess it .......................!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-6958352889430207786?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/6958352889430207786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=6958352889430207786' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/6958352889430207786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/6958352889430207786'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2008/12/exmples-of-c-programming.html' title='Ex@mples of   C#  programming'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-2692640322412316770</id><published>2008-12-13T05:29:00.000-08:00</published><updated>2008-12-13T05:54:28.085-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><title type='text'>Be a Good Programmer</title><content type='html'>&lt;span style="font-size:130%;"&gt;Well in order to be a Good Programmer you have to be a good learner, patient and humble..&lt;br /&gt;Never be under the opinion that you are the best since there are no "GURU'S" in programming..&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;So firstly brush up with your concepts, be thorough with all the concept's be it any language.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;Go to a good institute and make your self used to programming.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;Write a basic code (program)  and then understand how exactly the program is going to be executed, don't start off with a huge code but take a small and easy one.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;So now you have a picture on how the program will be executed, so now is the fun part, make a backup of the code and mess the code !!!&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;I know your thinking I'm crazy but this really helps, so as i said mess up the code and note down the errors, study them and find out what exactly caused the error. So this way you'll know to Debug the program, and this will help you in the future when you deal with a huge code..&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;When you finish this task you are not done yet, now think of a way you can improve this code, make it more unique, make it your own... This way you'll master the program and make it easy, easier and easiest..!&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;As you go deep into the subject, read different codes in different websites ( we know Internet is the base for all these stuff ) go through different blogs about programming and learn more.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;Think like a programmer and not an end user, to be a programmer you have to think like a programmer.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;Lastly Don't make this(programming) your job, but make this your passion..!&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;All the best..!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.samzfunzone.blogspot.com/"&gt;Jammy&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-2692640322412316770?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/2692640322412316770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=2692640322412316770' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/2692640322412316770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/2692640322412316770'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2008/12/be-good-programmer.html' title='Be a Good Programmer'/><author><name>Sammy..</name><uri>http://www.blogger.com/profile/01590589344789943912</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_D6-PrkaH1Ak/SXwpJeq73rI/AAAAAAAAAH8/jlUR4KQD1qc/S220/123.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-8838006660854101573</id><published>2008-12-12T08:08:00.000-08:00</published><updated>2008-12-15T10:17:39.374-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>Keywords ,variables, Functions in C#</title><content type='html'>In the sample program we have come across a statement     "using System"&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; using System;   &lt;/span&gt;&lt;blockquote&gt;&lt;/blockquote&gt;Here using is a keyword used to include the namespaces in the program. Keywords r reserved words which have special meaning. Here &lt;span style="font-style: italic;"&gt;using System&lt;/span&gt; declares that you can refer to the class defined in the namespace without using the fully qualified name. A program can include multiple &lt;span style="font-style: italic;"&gt;using&lt;/span&gt; statements.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;class Keyword&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The class keyword is used to declare a class . The braces ,known as delimeters ,are used to indicate the start and end of class body.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Member variables&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;variables are used to store data. These r also called as date members of a class or instance members of a class.  These variables r declared with the suitable data types.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Member functions&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A function is a set of statements that perform a specific task in response to a message . Member functions of a class r declared inside the class.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Instantiating a class&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To create memory for a class we generally use the system of dynamic allocation in C#.(i.e by using the keywords new and delete). so to allocate memory to a class we take help of &lt;span style="font-style: italic;"&gt;objects&lt;/span&gt; which act as instance for the class . These objects interact with each other by passing messages and by responding to received messages. Objects use methods to pass messages, the task of passing messages is done by using member functions.  all the objects of a class will use the same copy of member functions through out but they use different copy of member variables in memory.&lt;br /&gt;&lt;br /&gt;                           &lt;blockquote&gt;eg:    Student std=new Student();&lt;br /&gt;&lt;br /&gt;here 'std' is the object of class Student where memory is allocated dyanamically using the keyword new.&lt;br /&gt; we can access the member functions using this object 'std' .&lt;br /&gt;&lt;br /&gt;eg: &lt;br /&gt;std.Accept();&lt;br /&gt;std.Display();&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-8838006660854101573?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/8838006660854101573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=8838006660854101573' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/8838006660854101573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/8838006660854101573'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2008/12/keywords-variables-functions-in-c.html' title='Keywords ,variables, Functions in C#'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-8783559836863257847</id><published>2008-12-07T01:27:00.000-08:00</published><updated>2008-12-08T06:17:16.140-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>Sample C# programming</title><content type='html'>Here is a sample C# program &lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;&lt;br /&gt;class Student&lt;br /&gt;{&lt;br /&gt;//Member data.&lt;br /&gt;       string name;&lt;br /&gt;       int id;&lt;br /&gt;&lt;br /&gt;//Member functions.&lt;br /&gt;       Public void Accept()&lt;br /&gt;       {&lt;br /&gt;                Console.WtiteLine("Enter the name:\t");&lt;br /&gt;                 name =Console.ReadLine();&lt;br /&gt;                Console.WriteLine("Enter the id of employee:\t");&lt;br /&gt;                 id=Convert.ToInt32(Console.ReadLine());&lt;br /&gt;       }&lt;br /&gt;       public void Display()&lt;br /&gt;       {&lt;br /&gt;               Console.WriteLine("The  name is :{0}",name);&lt;br /&gt;        Console.WriteLine("The id is :{0}",id);&lt;br /&gt;        }&lt;br /&gt;}&lt;br /&gt;// class used to intiate student class&lt;br /&gt;class Executestudent&lt;br /&gt;{&lt;br /&gt;          public static void Main(string[]  arg)&lt;br /&gt;          {&lt;br /&gt;                      Student st=new Student();&lt;br /&gt;                       st.Accept();&lt;br /&gt;                       st.Display();&lt;br /&gt;          }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-8783559836863257847?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/8783559836863257847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=8783559836863257847' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/8783559836863257847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/8783559836863257847'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2008/12/sample-c-programming.html' title='Sample C# programming'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-5705481889365970632</id><published>2008-12-04T19:53:00.000-08:00</published><updated>2008-12-08T06:17:16.141-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>Operations on Member variables</title><content type='html'>Accepting and storing values in Member variables&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;So far we have seen different programming languages where they contain  different libraries, different code snippets with different syntax, but other than these there is one thing common in all programming languages i.e input and output statements. In C#(a purely OOPs concept) we also use input and output statements with the following syntax.&lt;br /&gt;&lt;br /&gt;example: &lt;br /&gt;&lt;blockquote&gt;int Number;&lt;br /&gt;Number=Convert.ToInt32(Console.ReadLine());&lt;br /&gt;&lt;br /&gt;Here Console.ReadLine() is a function which accepts the inputs from user and store it in the variable 'Number'. 'Console.ReadLine() ' is a function of Console class and in turn the console class s said to be part of System namespace(collection of classes).&lt;br /&gt;&lt;br /&gt;Convert.ToInt32()  converts the data entered by the user to integer format. A user has a doubt that why an integer value is again converted into int by using those function, yes , while taking input a compiler generally takes input in &lt;span style="font-style: italic;"&gt;string&lt;/span&gt; format so in order to convert the data entered by the user to prescribe type we use the function.&lt;br /&gt;                 Convert()  method Explicitly tells the compiler to convert one data type to another data type and this is called &lt;span style="font-style: italic;"&gt;explicit conversion&lt;/span&gt; .The compiler performs an implicit conversion automatically. (exam: in implicit conversion converts the int data type to float or float datatype to int ,automatically).  &lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-5705481889365970632?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/5705481889365970632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=5705481889365970632' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/5705481889365970632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/5705481889365970632'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2008/12/operations-on-member-variables.html' title='Operations on Member variables'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-1751193706875080422</id><published>2008-12-03T07:51:00.000-08:00</published><updated>2008-12-08T06:17:16.141-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>Variables in C#</title><content type='html'>Before talking about variable we shall first know What is a variable ?&lt;br /&gt;         A &lt;span style="font-style: italic;"&gt;variable&lt;/span&gt; is a location in a memory that has a name and holds some value. the value can be an integer, character, decimal. A variable is declared with a specific data type in order to represent what value the variable holds.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Naming the variables in C#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. Must begin with a character  or an underscore and it should be followed by sequence of characters. can not declare a variable which starts with a digit or any other special symbols (other than underscore).&lt;br /&gt;&lt;br /&gt;2. a variable should not contain any special symbols . keywords can not be used as variable names.&lt;br /&gt;&lt;br /&gt;Examples for &lt;span style="font-style: italic;"&gt;valid variable names&lt;/span&gt;&lt;br /&gt;    Game_level&lt;br /&gt;    Myclass (using pascal case).&lt;br /&gt;    sum_of_individual_num.&lt;br /&gt;&lt;br /&gt;invalid variable names&lt;br /&gt;    #result&lt;br /&gt;    2score&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Note&lt;/span&gt;: C# is a case sensitive language. It means that uppercase letters are different from lower case. &lt;span style="font-style: italic;"&gt;exam:&lt;/span&gt; TennisPlayerName is diff from tennisplayername&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Declaring a variable in C#&lt;/span&gt;&lt;br /&gt;                           &lt;data&gt; &lt;variable_name&gt;datatype  variablename ;&lt;br /&gt;&lt;br /&gt;we can also &lt;span style="font-style: italic;"&gt;define a variable&lt;/span&gt; at the time of declaration&lt;br /&gt;                           &lt;data&gt; &lt;variable&gt;datatype  variablename=&lt;value&gt;value;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;exam:&lt;/span&gt;&lt;br /&gt;int result;&lt;br /&gt;            char choice='v';&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;data types in C#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  predefined type             Bytes                   Range&lt;br /&gt;&lt;br /&gt;&lt;/value&gt;&lt;/variable&gt;&lt;/data&gt;&lt;/variable_name&gt;&lt;/data&gt;&lt;div style="text-align: justify;"&gt;&lt;data&gt;&lt;variable_name&gt;&lt;data&gt;&lt;variable&gt;&lt;value&gt;1.  char     2bytes   range                         (0 to 65535).&lt;/value&gt;&lt;/variable&gt;&lt;/data&gt;&lt;/variable_name&gt;&lt;/data&gt;&lt;br /&gt;&lt;data&gt;&lt;variable_name&gt;&lt;data&gt;&lt;variable&gt;&lt;value&gt;&lt;/value&gt;&lt;/variable&gt;&lt;/data&gt;&lt;/variable_name&gt;&lt;/data&gt;&lt;/div&gt;&lt;data&gt;&lt;variable_name&gt;&lt;data&gt;&lt;variable&gt;&lt;value&gt;2.  int                                          4bytes    range                         (-2,147,483,648   to   2,147,483,647)&lt;br /&gt;3.  float                                     4bytes&lt;br /&gt;4.  double                              8bytes&lt;br /&gt;5.  bool       1byte    specifies whether true or false                       true or false&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;they r mainly two type of data types used&lt;br /&gt;1. value type.&lt;blockquote&gt;&lt;/blockquote&gt;               The value type includes int, float, char.   these directly contain data.&lt;br /&gt;2. reference type.&lt;br /&gt;         &lt;br /&gt;               These do not contain any data but  contain reference to variables which are stored in memory. &lt;span style="font-style: italic;"&gt;example&lt;/span&gt; of reference type is  '&lt;span style="font-style: italic;"&gt;string&lt;/span&gt;' .&lt;/value&gt;&lt;/variable&gt;&lt;/data&gt;&lt;/variable_name&gt;&lt;/data&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-1751193706875080422?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/1751193706875080422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=1751193706875080422' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/1751193706875080422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/1751193706875080422'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2008/12/variables-in-c.html' title='Variables in C#'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-8671998548578806791</id><published>2008-12-02T03:49:00.000-08:00</published><updated>2008-12-08T06:17:16.141-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>Cl@sses in C#</title><content type='html'>In general we know that a class consists of Member data and Member functions. so similarly in C# a class definition contains Member data and function . Now let us consider an example of  a class in C#&lt;br /&gt;&lt;br /&gt;public class Hello&lt;br /&gt;{&lt;br /&gt;     public static void main(string [] args)&lt;br /&gt;     {&lt;br /&gt;               system.console.WriteLine("Hello, fnds");&lt;br /&gt;     }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Now we shall learn about each and every step in detail&lt;br /&gt;&lt;br /&gt;1.  In any programming language the execution starts from main function and this is said to be the entry point of the application.&lt;br /&gt;&lt;br /&gt;2.  Main function is used to create objects  and invoke member functions.&lt;br /&gt;&lt;br /&gt;A &lt;span style="font-weight: bold;"&gt;class&lt;/span&gt; keyword is used in order to create a class . While designing a class we have to remember the following &lt;span style="font-style: italic;"&gt;class naming conventions&lt;/span&gt;.&lt;br /&gt;&lt;ul&gt;&lt;li&gt; should be meaningful.&lt;/li&gt;&lt;li&gt;should identically be a noun.&lt;/li&gt;&lt;li&gt;we can use either pascal case or camel case, where in &lt;span style="font-style: italic;"&gt;pascal case&lt;/span&gt; the first letter is capitalized and rest are small (ex: Hello) cmg to &lt;span style="font-style: italic;"&gt;camel case&lt;/span&gt; the first letter is in lower case and first letter of each subsequent word must be in caps (ex: myClass). &lt;blockquote&gt;Rules for naming a class is&lt;br /&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt; They must be begin with a letter and not with digits or special symbols.&lt;/li&gt;&lt;li&gt;a class name should not contain any special characters (other than '_').&lt;br /&gt;&lt;/li&gt;&lt;li&gt;We must not declare a class with any keyword . &lt;blockquote&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;Now coming to System.Console.WriteLine()&lt;blockquote&gt;&lt;/blockquote&gt;Here Console is a class that belongs to System namespace . A namespace is a collection of classes . The system namespace contains the method WriteLine(), which displays the enclosed text on the screen. The console class has other methods, which are used for various input/output operations. The character (.) is used to access the function, WriteLine(), which is coded in the Console class of the System namespace.     &lt;blockquote&gt;here  from the above example the statement Console.WriteLine("Hello, fnds"); gives the output as Hello, fnds.  It is similar to  printf (in C), cout( in C++) .&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;We can also use escape sequences in these output statements.&lt;/li&gt;&lt;li&gt;"String [] arg" declared in main function means that is a predefined class name which takes only one argument . It allows a programmer to pass inputs at command line level. In java we pass this as 'main(String arg[])'.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-8671998548578806791?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/8671998548578806791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=8671998548578806791' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/8671998548578806791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/8671998548578806791'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2008/12/clsses-in-c.html' title='Cl@sses in C#'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-8854818293977771016</id><published>2008-12-01T08:12:00.000-08:00</published><updated>2008-12-08T06:17:16.142-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>Introducing C#</title><content type='html'>Before knowing about the origin of C# we shall know about the evolution of some basic languages .&lt;br /&gt;&lt;br /&gt;                 Computer languages have come a long way since the 1940. Before evolution of languages the instructions was passed into systems as zeroes and ones ,and these where mainly used in &lt;span style="font-style: italic;"&gt;1st generation&lt;/span&gt; of computers. this was considered to be as machine understandable language.&lt;br /&gt;&lt;br /&gt;                 Later on in &lt;span style="font-style: italic;"&gt;2nd generation&lt;/span&gt;, they used assembler languages to give instructions to computer. But still the computer was in a position to understand only machine language .so in order to over come this problem they developed a assembler software which translates the assembly language into machine level language.&lt;br /&gt;&lt;br /&gt;                 Now it was the time to develop &lt;span style="font-style: italic;"&gt;Operating system&lt;/span&gt;, so &lt;span style="font-style: italic; font-weight: bold;"&gt;Martin Richard&lt;/span&gt; developed a language called BCPL. later on this BCPL was modified by Ken Thompson and it resulted in the language B. When &lt;span style="font-style: italic; font-weight: bold;"&gt;Ken Thompson&lt;/span&gt; was working at Bell laboratories he teamed up with &lt;span style="font-weight: bold;"&gt;Dennis Ritchie&lt;/span&gt;  and wrote the early version of Unix operating system for a DEC PDP-7 computer. Now comes the evolution of language C.&lt;br /&gt;&lt;br /&gt;                 Dennis ritchie was working on a project of further developing Unix operating system ,so for that purpose he required a low level language like assembly language that could control hard ware efficenlty and at the same time it should provide features of high level language (i.e it should run on different hardwares) . So he started working with 'B' he found draw backs in that language and he modified it and named it as 'C'. so after the development of C language the entire Unix system was coded in C . It came into existence in 1972.  In 1989&lt;span style="font-style: italic;"&gt; American National Standard Institute&lt;/span&gt;(ANSI) along with &lt;span style="font-style: italic;"&gt;International &lt;/span&gt;Standards Organisation (ISO) approved a machine independent and standard version of C.&lt;br /&gt;&lt;br /&gt;                   In early 1980s, &lt;span style="font-weight: bold;"&gt;Bjarne Stroustrup&lt;/span&gt; of Bell Labs developed the C++ language. C++ was originally known as '&lt;span style="font-style: italic;"&gt;C with classes&lt;/span&gt;' because two languages contributed to its design: C,which provide low-level features, and Simula67, which provided the class cocept. C++ is an  object-oriented language.Other examples of object oriented languages are Java, Smalltalk, and C#.&lt;br /&gt;&lt;br /&gt;                    C# (C-sharp) is a programming language introduced by &lt;span style="font-weight: bold;"&gt;Microsoft&lt;/span&gt;. C# contains features similar to java and c++ .&lt;span style="font-style: italic;"&gt;Is is especially designed to work with Microsoft's .NET platform.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-8854818293977771016?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/8854818293977771016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=8854818293977771016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/8854818293977771016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/8854818293977771016'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2008/12/introducing-c.html' title='Introducing C#'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-4783989615228477863</id><published>2008-12-01T02:14:00.000-08:00</published><updated>2008-12-08T06:17:16.142-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>Char of Object orientation approach</title><content type='html'>Now we shall discuss about char of object orientation programming in short.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Realistic Modeling&lt;/span&gt;&lt;blockquote&gt;It is based on modeling a real world which comprises of objects . Object oriented approach allows you to identify objects having attributes and behavior. Attributes and behavior explains how an object acts and reacts. consider the &lt;span style="font-style: italic;"&gt;example&lt;/span&gt; :-  car is an object of class vehicle which has the attributes such as speed, color, power. It displays  behavior such as  being stationery, moving slowly, accelerating.&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Reusability&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;blockquote&gt;&lt;/blockquote&gt;         The Process of using an object for different purposes  is known as reusability. This concept mainly involves the usage of existing classes or objects from other applications resources spent in recreating the classes from scratch. &lt;span style="font-style: italic;"&gt;example&lt;/span&gt;: consider the usage of a two seater car&lt;/span&gt; &lt;span style="font-weight: normal;"&gt;to bring it to four seater car which posses new attributes and behaviour&lt;/span&gt;.                                                                                                                                             note: &lt;/span&gt;Process of creating a new class by adding some features to existing class is known as &lt;span style="font-style: italic;"&gt;inheritance&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;.&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Resilence to change &lt;blockquote&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;blockquote&gt; An existing object can be used to create a similar object.                        &lt;span style="font-style: italic;"&gt;exam:&lt;/span&gt; you have a wooden chair and you need to add a head rest to it . So this feature of object orientation programming explains the modification of already existing object to a new object. so inorder to obtain a chair with headrest there is no need for the user to create a new chair but instead he can use  the existing chair and add a headrest to it .       Resilence to change results in easier maintenance and this feature of Oops is also known as &lt;span style="font-style: italic;"&gt;Extensibility.&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;/blockquote&gt;      &lt;blockquote&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-4783989615228477863?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/4783989615228477863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=4783989615228477863' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/4783989615228477863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/4783989615228477863'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2008/12/char-of-object-orientation-approach.html' title='Char of Object orientation approach'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3090727938691946351.post-843162131355322320</id><published>2008-11-30T08:42:00.000-08:00</published><updated>2008-12-08T06:17:16.143-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Programming'/><title type='text'>OOPs using C#</title><content type='html'>&lt;ul&gt;&lt;li&gt;Object-Oriented Programming(OOPs) is one of the most popular methodologies in software development.&lt;/li&gt;&lt;li style="text-align: left;"&gt;Main &lt;span style="font-style: italic;"&gt;features&lt;/span&gt; of Oops programming is it &lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;1.Speeds the program development process.                                                        2.Improves maintenance,enhances &lt;span style="font-style: italic;"&gt;reusability&lt;/span&gt; of program.&lt;/blockquote&gt;&lt;/li&gt;&lt;li style="text-align: left;"&gt;Object orientation is a software development methodology that is based on modeling real world system.&lt;/li&gt;&lt;li style="text-align: left;"&gt;Before knowing about Object orientation we shall know what does an object mean , it is a core concept involved in Object orientation .&lt;/li&gt;&lt;li style="text-align: left;"&gt;An &lt;span style="font-style: italic;"&gt;object&lt;/span&gt; is representation of &lt;span style="font-style: italic;"&gt;real-world entity.&lt;/span&gt;                                                                      examples: a employee, a car , woman .&lt;/li&gt;&lt;li style="text-align: left;"&gt;In easier way we can assume an object as " a collection of objects and their inter-relationship".&lt;br /&gt;&lt;/li&gt;&lt;li style="text-align: left;"&gt;Object orientation is a type of methodology used for building software applications, it consists of classes, objects, methods.&lt;/li&gt;&lt;li style="text-align: left;"&gt;In general a software is developed  by breaking an application into different modules called as component objects. These objects interact with each other when the whole application is put together.&lt;/li&gt;&lt;li style="text-align: left;"&gt; let us now know what an object really mean, " &lt;span style="font-style: italic;"&gt;object&lt;/span&gt; is combination of messages and data. Objects can receive and send messages and use the messages to interact with each other . The messages contain info that is to be passed to recipient object.&lt;/li&gt;&lt;li style="text-align: left;"&gt;while describing an object in Oops we ensure that an object has basically 3 characteristics&lt;br /&gt;            1. It has a state.   2. It may display Behavior.   3.It has a unique identity.&lt;/li&gt;&lt;li style="text-align: left;"&gt;example is consider a cell phone whose &lt;span style="font-style: italic;"&gt;states&lt;/span&gt; are &lt;span style="font-style: italic;"&gt;Off, Ring, Vibrate and call.&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090727938691946351-843162131355322320?l=vickys-progenvi4u.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vickys-progenvi4u.blogspot.com/feeds/843162131355322320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3090727938691946351&amp;postID=843162131355322320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/843162131355322320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3090727938691946351/posts/default/843162131355322320'/><link rel='alternate' type='text/html' href='http://vickys-progenvi4u.blogspot.com/2008/11/oops-using-c.html' title='OOPs using C#'/><author><name>vivek</name><uri>http://www.blogger.com/profile/11975717829465802718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
