Click here to Skip to main content
15,885,278 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# code highlight as in Visual Studio Pin
Ed.Poore18-Apr-07 7:22
Ed.Poore18-Apr-07 7:22 
Questiondisplaying data in more than one textbox C# Pin
Deques18-Apr-07 1:56
Deques18-Apr-07 1:56 
AnswerRe: displaying data in more than one textbox C# Pin
sujithkumarsl18-Apr-07 2:05
sujithkumarsl18-Apr-07 2:05 
AnswerRe: displaying data in more than one textbox C# Pin
J4amieC18-Apr-07 2:09
J4amieC18-Apr-07 2:09 
GeneralRe: displaying data in more than one textbox C# Pin
Deques18-Apr-07 2:25
Deques18-Apr-07 2:25 
QuestionSelect Item after it has moved up or down the list. Pin
kripzz18-Apr-07 1:42
kripzz18-Apr-07 1:42 
QuestionVirtual Function in C#.Net Pin
meeram39518-Apr-07 1:19
meeram39518-Apr-07 1:19 
AnswerRe: Virtual Function in C#.Net Pin
sujithkumarsl18-Apr-07 1:41
sujithkumarsl18-Apr-07 1:41 
HI consider this situation
using System;
using System.Collections.Generic;
using System.Text;

namespace @virtual
{
class Base
{
public void Display()
{
Console.WriteLine("I am from base");
}

}
class Derived : Base
{
public void Display()
{
Console.WriteLine("I am from derived");
}
}
class Program
{
static void Main(string[] args)
{
Base b = new Derived();
b.Display();
Console.Read();
}
}
}

The result will be I am from Base
If you want to dispaly the derived class method you can use virtual methods
using System;
using System.Collections.Generic;
using System.Text;

namespace @virtual
{
class Base
{
public virtual void Display()
{
Console.WriteLine("I am from base");
}

}
class Derived : Base
{
public override void Display()
{
Console.WriteLine("I am from derived");
}
}
class Program
{
static void Main(string[] args)
{
Base b = new Derived();
b.Display();
Console.Read();
}
}
}

this will give I am from Derived


Its like abstract methods, Try to learn design patterns,in which virtual methods are used

My small attempt...

AnswerRe: Virtual Function in C#.Net Pin
Levnsn18-Apr-07 1:43
Levnsn18-Apr-07 1:43 
GeneralRe: Virtual Function in C#.Net Pin
meeram39518-Apr-07 2:05
meeram39518-Apr-07 2:05 
AnswerRe: Virtual Function in C#.Net Pin
J4amieC18-Apr-07 2:11
J4amieC18-Apr-07 2:11 
QuestionHow can i remove "plus" from TreeView node? Pin
Levnsn18-Apr-07 0:48
Levnsn18-Apr-07 0:48 
AnswerRe: How can i remove "plus" from TreeView node? Pin
Svett18-Apr-07 1:05
Svett18-Apr-07 1:05 
GeneralRe: How can i remove "plus" from TreeView node? Pin
Levnsn18-Apr-07 1:23
Levnsn18-Apr-07 1:23 
AnswerRe: How can i remove "plus" from TreeView node? Pin
Abisodun18-Apr-07 1:41
Abisodun18-Apr-07 1:41 
GeneralRe: How can i remove "plus" from TreeView node? Pin
Levnsn18-Apr-07 4:33
Levnsn18-Apr-07 4:33 
QuestionHow to identify conversation Mails Pin
ArunkumarSundaravelu18-Apr-07 0:40
ArunkumarSundaravelu18-Apr-07 0:40 
QuestionCreating a custom textbox Pin
jozsurf18-Apr-07 0:16
jozsurf18-Apr-07 0:16 
AnswerRe: Creating a custom textbox Pin
J4amieC18-Apr-07 0:32
J4amieC18-Apr-07 0:32 
GeneralRe: Creating a custom textbox Pin
jozsurf18-Apr-07 14:45
jozsurf18-Apr-07 14:45 
GeneralRe: Creating a custom textbox Pin
jozsurf18-Apr-07 16:04
jozsurf18-Apr-07 16:04 
QuestionC#: how to get estimated download time Pin
suveenmohan17-Apr-07 23:54
suveenmohan17-Apr-07 23:54 
AnswerRe: C#: how to get estimated download time Pin
Christian Graus18-Apr-07 0:02
protectorChristian Graus18-Apr-07 0:02 
GeneralRe: C#: how to get estimated download time Pin
suveenmohan18-Apr-07 0:39
suveenmohan18-Apr-07 0:39 
QuestionDoDragDrop and MouseClick event Pin
Jon Hulatt17-Apr-07 23:53
Jon Hulatt17-Apr-07 23:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.