Ads by Lake Quincy Media
| Next Tip?
Home » Archive

Articles Archive for October 2008

CSharp, Interview Questions, Tutorial »

[28 Oct 2008 | One Comment | 272 views]

Threading in C# – Easier to write
It’s a subsequent Code-Snippet of Article :Threading – A Step Ahead Story.
/* This Example is a part of different
* examples shown in Book:
* C#2005 Beginners: A Step Ahead
* Written by: Gaurav Arora
* Reach at : gaurav.aroraose@yahoo.co.in */
// File name : threading.cs
using System;
using System.Threading;
namespace CSharp.AStepAhead.threading
{
class threading
{
public threading()
{
//Thread th = new Thread(new ThreadStart(writeData(“Gaurav”)));
//th.Start();
}
public static string nm;
public static int i;
protected static void writeData()
{
//string str;
for (i=0; i<=nm.Length-1; i++)
{
Console.ForegroundColor = ConsoleColor.Blue;
Thread.Sleep(1000);
Console.WriteLine(” {0}”, nm.Substring(i, 1));
//Console.WriteLine(str);
}
}
static void Main()
{
string name,lname;
Console.Write(“Enter First Name : “);
name = Console.ReadLine();
Console.Write(“Enter Last Name : “);
lname = Console.ReadLine();
threading.nm …

Asp.net, CSharp, Interview Questions, Tutorial »

[28 Oct 2008 | 2 Comments | 81 views]

Scope
Scope of this article is upto its title and subsequent reference of A Step Ahead Series
Threading in CSharp – A Step Ahead Series
Multi-Threading
In Software this is not a new concept. Multithreading forms a subset of multitasking. Instead of having switch between programs this feature switches between different parts of the same program. For example when you are writing words in Ms-word then spell checking is going on background.
Threads
Simply, thread is the basic unit having processor tie, allocated by operating system. A thread can be defined as a …

Asp.net, CSharp »

[28 Oct 2008 | No Comment | 139 views]

Events in CSharp
In C# events are based on delegates, with the originator defining one or more call back functions. A call back function is a function in which one piece of code defines another implements, in other words, one piece of code says, “If you implement a function which looks like this, I can call it”. A class that wants to sue events defines callback functions or delegates, and the listening object then implements them.
An event is a member that enables an object or class to provide notifications.
As compared to …

Get Adobe Flash playerPlugin by wpburn.com wordpress themes