DirectorySoftwareBlog Details for "Learn C sharp"

Learn C sharp

Learn C sharp
A blog which helps novice programmers learn c sharp 2005
Articles: 1, 2, 3, 4

Articles

csharprocks is now....
2007-09-01 18:56:00
http://www.csharprox.com ....we have changed! Do you know when to use an abstract class vs an interface?...Do u know how to create your own auto complete TextBox?. Log on to www.csharprox.com
Some Important Keywords in c#
2007-07-12 14:05:00
Keywords in c# abstract A class modifier that specifies that the class must be derived from to be instantiated.   as A binary-operator type that casts the left operand to the type specified... Do you know when to use an abstract class vs an interface?...Do u know how to create your own auto complete TextBox?. Log on to www.csharprox.com
More About: Keywords , Import , Some
ASCII Character Set
2007-07-09 11:45:00
ASCII Char acter ... Do you know when to use an abstract class vs an interface?...Do u know how to create your own auto complete TextBox?. Log on to www.csharprox.com
More About: Ascii , Hara
Partial Classes
2007-07-08 09:14:00
Another language feature added in C# 2.0 is partial classes. Partial classes are portions of a class that the compiler can combine to form a complete class. Although you could define two or more... Do you know when to use an abstract class vs an interface?...Do u know how to create your own auto complete TextBox?. Log on to www.csharprox.com
More About: Classes
The Common Documentation Comment Instructions / Comment Instructions in c#
2007-07-07 05:00:00
The Comm on Documenta tion Comment Instructions Instruction What It Means <summary></summary>      Describes the function itself. Displays when you enter the name of the function during... Do you know when to use an abstract class vs an interface?...Do u know how to create your own auto complete TextBox?. Log on to www.csharprox.com
Simple types in c# / Data types in c# 2.0
2007-07-06 07:30:00
Type Size in bits Value range Standard bool 8 true or false    byte 8 0 to 255, inclusive    sbyte 8 128 to 127, inclusive    char 16 'u0000' to 'uFFFF' (0 to 65535),... Do you know when to use an abstract class vs an interface?...Do u know how to create your own auto complete TextBox?. Log on to www.csharprox.com
More About: Data , Simple , Types
Data Binding without Code / DataGridView Control
2007-07-05 15:32:00
Bind to Data Without Writing Code This is basically a guided tutorial on how to bind the dataGridView control to the database. Drag and drop the dataGridView control on the Form. To set up the... Do you know when to use an abstract class vs an interface?...Do u know how to create your own auto complete TextBox?. Log on to www.csharprox.com
More About: Tutorials , Control , Bindi
Events in c# / Delegates and Events
2007-07-05 09:12:00
What are events? Events are simply signals sent by an action. Clicking of a mouse button, pressing of a key are all events. In GUI's events are occurred and we have some action which follows an... Do you know when to use an abstract class vs an interface?...Do u know how to create your own auto complete TextBox?. Log on to www.csharprox.com
More About: Delegates , Vent
Covariance and Contravariance
2007-07-05 08:20:00
C# 2.0 has added two more features to delegates "Covariance and contravariance". From my earlier discussions you already know that a method passed to a delegate must have the same return type and... Do you know when to use an abstract class vs an interface?...Do u know how to create your own auto complete TextBox?. Log on to www.csharprox.com
More About: Rava
Anonymous Methods / Pass Arguments to an Anonymous Method / Return a value
2007-07-05 06:09:00
C# 2.0 provides greater flexibility in terms of simplicity. You can pass a block of code to a delegate just like a method, but here no method name exists. Imagine sending methods signature and code... Do you know when to use an abstract class vs an interface?...Do u know how to create your own auto complete TextBox?. Log on to www.csharprox.com
More About: Return , Pass , Methods , Anonymous , Turn
Create Auto-Complete Text Boxes 2
2007-07-04 09:54:00
What are auto-complete text boxes? Due to high viewership i have decided to dicuss in more detail on how to create auto-complete text boxes. this post is a sequel of my previos post found here. As... Do you know when to use an abstract class vs an interface?...Do u know how to create your own auto complete Text Box?. Log on to www.csharprox.com
More About: Auto , Complete , Create
Multicasting Delegates
2007-07-04 06:20:00
One of the most important feature in delegates is multicasting. In multicasting you can create an invocation list, or a series of methods assigned to a delegate by the + or += operator. Methods can... Do you know when to use an abstract class vs an interface?...Do u know how to create your own auto complete TextBox?. Log on to www.csharprox.com
More About: Delegates , Icas
Using Instance Methods as Delegates
2007-07-03 16:13:00
In my last post about Delegates , I used a static class method as a delegate, but today I'm going to assign a non static class method to a delegate.delegate int calculator(int a,int b); //Declare a delegate. class Program { class Cal { //Two public non static methods. public int sum(int a, int b) { return a + b; } public int multi(int a, int b) { return a * b; } } static void Main(string[] args) { //Instance of Class Cal Cal c1 = new Cal(); //Declare a reference to a delegate calci calculator calci = c1.sum; //Inovoke sum via delegate calci int temp = calci(10, 20); Console.WriteLine("10 +...
More About: Methods , Method
Using Instance Methods as Delegates
2007-07-03 16:13:00
In my last post about Delegates , I used a static class method as a delegate, but today I'm going to assign a non static class method to a delegate. delegate int calculator(int... Do you know when to use an abstract class vs an interface?...Do u know how to create your own auto complete TextBox?. Log on to www.csharprox.com
More About: Methods , Method
Commonly Used String Instance Methods
2007-06-29 15:48:00
  Method Description CompareTo Compares this string instance with another string instance. Contains Returns a Boolean indicating whether the current string instance contains the given... Do you know when to use an abstract class vs an interface?...Do u know how to create your own auto complete TextBox?. Log on to www.csharprox.com
More About: Methods , String , Comm , Tring
Commonly Used String Instance Methods
2007-06-29 15:48:00
 Method DescriptionCompareToCompares this string instance with another string instance.ContainsReturns a Boolean indicating whether the current string instance contains the given substring.CopyToCopies a substring from within the string instance to a specified location within an array of characters.EndsWithReturns a Boolean value indicating whether the string ends with a given substring.EqualsIndicates whether the string is equal to another string. You can use the '==' operator as well.IndexOfReturns the index of a substring within the string instance.IndexOfAnyReturns the first index occurrence of any character in the substring within the string instance.PadLeftPads the string with the specified number of spaces or another Unicode character, effectively right-justifying the string.PadRightAppends a specified number of spaces or other Unicode character to the end of the string, creating a left-justification.RemoveDeletes a given number of characters from the string.ReplaceReplaces ...
More About: Methods , String , Comm , Tring
Some queue class methods:
2007-06-28 15:29:00
Queue Method s MethodDescriptionClearRemoves all items from the QueueEnqueueAdds an item to the end of the QueueDequeueReturns and takes an item off the beginning of the QueuePeekReturns the item at the beginning of the Queue without removing itToArrayConverts the contents of the Queue to a fixed-length array of a given type
More About: Collections , Queue , Class
Some queue class methods:
2007-06-28 15:29:00
Queue Method s Method Description Clear Removes all items from the Queue Enqueue Adds an item to the end of the Queue Dequeue Returns and takes an item off the beginning of the Queue Peek Returns the... Do you know when to use an abstract class vs an interface?...Do u know how to create your own auto complete TextBox?. Log on to www.csharprox.com
More About: Collections , Queue , Class
Iterating over Each Character in a String / Foreach vs For loop to iterate
2007-06-28 07:28:00
Problem You need to iterate over each character in a string efficiently in order to examine or process each character. Solution C# provides two methods for iterating strings. The first is the... Do you know when to use an abstract class vs an interface?...Do u know how to create your own auto complete TextBox?. Log on to www.csharprox.com
More About: Character , String , Tera , Fore , Rate
Iterating over Each Character in a String / Foreach vs For loop to iterate
2007-06-28 07:28:00
ProblemYou need to iterate over each character in a string efficiently in order to examine or process each character.SolutionC# provides two methods for iterating strings. The first is the foreach loop, which can be used as follows:    string testStr = "abc123";    foreach (char c in testStr)    {     Console.WriteLine(c.ToString ( ));    }This method is quick and easy. Unfortunately, it is somewhat less flexible than the second method, which uses the for loop instead of a foreach loop to iterate over the string. For example:    string testStr = "abc123";    for (int counter = 0; counter < testStr.Length; counter++)    {     Console.WriteLine(testStr[counter]);    } Discussion The foreach loop is simpler and thus less error-prone, but it lacks flexibility. In contrast, the for loop is slightly more complex, but it makes up for that in flexibility.The for loop method uses the indexer of the string variable testStr to get the character located at the position indicated by ...
More About: Character , Tera , Fore , Rate
Ways to assign a method to a delegate/Delegate Method Group conversion
2007-06-27 13:03:00
One way to assign a method to a delegate is by using the new operator. class Program { //Declare a... Do you know when to use an abstract class vs an interface?...Do u know how to create your own auto complete TextBox?. Log on to www.csharprox.com
More About: Delegates , Conversion , Group , Version , Method
Ways to assign a method to a delegate/Delegate Method Group conversion
2007-06-27 13:03:00
One way to assign a method to a delegate is by using the new operator.class Program { //Declare a delegate delegate int calculator(int a,int b); //Static method sum declared having //same signature as of delegate calculator. static int sum(int a, int b) { return a+b; } static int multi(int a , int b) { return a*b; } static void Main(string[] args) { //Method assigned using new. calculator cal = new calculator(sum); int result; //method invoked using the delegate name. result=cal(20,30); Console.WriteLine("Sum of 20+30 is "+ result); cal=new calculator(multi); result=cal(20,30); Console.WriteLine("P...
More About: Conversion , Group , Version
Member Visibility Levels
2007-06-26 11:27:00
Visibility KeywordDescriptionpublicThis member is accessible from both inside the assembly and outside the assembly, as well as by members inside and outside the class.privateThis member is accessible only from code within the class definition itself.protectedThis member is accessible only to derived types, both inside and outside the assembly.internalThis member is accessible by any code within the assembly.public protectedThis member is accessible by all code within the assembly, but only by derived types outside the assembly.private protectedThis member is protected within the assembly (accessible only to derived types), but is inaccessible outside the assembly.
More About: Visibility
Member Visibility Levels
2007-06-26 11:27:00
Visibility Keyword Description public This member is accessible from both inside the assembly and outside the assembly, as well as by members inside and outside the class. private This member is... Do you know when to use an abstract class vs an interface?...Do u know how to create your own auto complete TextBox?. Log on to www.csharprox.com
More About: Classes , Visibility
Appending a Line
2007-06-26 10:42:00
Problem You need to append a line, including a line terminator, to the current string. Solution Use the AppendLine method of the StringBuilder class: StringBuilder sb = new StringBuilder("First... Do you know when to use an abstract class vs an interface?...Do u know how to create your own auto complete TextBox?. Log on to www.csharprox.com
Appending a Line
2007-06-26 10:42:00
ProblemYou need to append a line, including a line terminator, to the current string.SolutionUse the AppendLine method of the StringBuilder class: StringBuilder sb = new StringBuilder("First line of string"); // Terminate the first line. sb.AppendLine(); // Add a second line. sb.AppendLine("Second line of string");This code will display the following: First line of string Second line of stringDiscussionThe AppendLine method accepts a string and returns a reference to the same instance of the StringBuilder object on which this method was called. The string that is passed in to this method has a newline character or characters automatically appended on to the end of this string. The newline character(s) is dependent on the type of platform you are running. For example, Windows uses the carriage return and line-feed characters to represent a newline; on a Unix system the newline consists of only the line-feed character . You do not need to worry about this, as the AppendLine met...
Difference between a class and an interface
2007-06-25 13:02:00
The difference between an interface and a class is one that might not be immediately obvious if you're new to object-oriented programming. A class is an encapsulation of attributes and operations that may or may not inherit from another base class (the CLR does not support multiple inheritance). An interface is a contract that defines the attributes and operations that a class must implement in order to satisfy the conditions of the interface.For example, you can have a class that exposes a property called Color that might indicate the color of the object. You can also create an interface called IColorable. Any class that then implements that interface must define a property called Color. So, the essential difference between classes and interfaces is that classes are the definitions of abstractions of real-world entities, and interfaces are requirements and constraints to which all classes bound to the interfaces must conform. You will see more of how this works in the next section...
More About: Interface , Class , Difference , Ferenc , Ween
Difference between a class and an interface
2007-06-25 13:02:00
The difference between an interface and a class is one that might not be immediately obvious if you're new to object-oriented programming. A class is an encapsulation of attributes and operations... Do you know when to use an abstract class vs an interface?...Do u know how to create your own auto complete TextBox?. Log on to www.csharprox.com
More About: Classes , Interface , Class , Difference , Ferenc
Generating a Class Diagram
2007-06-25 05:13:00
Generating a Class Diagram The Class View window is useful for displaying the hierarchy of classes and interfaces in a project. Visual Studio 2005 also enables you to generate class diagrams which... Do you know when to use an abstract class vs an interface?...Do u know how to create your own auto complete TextBox?. Log on to www.csharprox.com
More About: Classes , Agra , Gram
Common Operations
2007-06-25 05:12:00
C# Language Basics Visual C# 2005 Express Edition   Working With Numbers int i = 0; // convert from a string int i = int.Parse("1"); // convert froma string and don't throw exceptions if... Do you know when to use an abstract class vs an interface?...Do u know how to create your own auto complete TextBox?. Log on to www.csharprox.com
More About: Common , Comm , Operation
More articles from this author:
1, 2, 3, 4
81253 blogs in the directory.
Statistics resets every week.


Contact | About
© Blog Toplist 2009 - Supported by Web Catalog - SEO by FeWorks
eXTReMe Tracker