Click here to Skip to main content
15,912,329 members
Home / Discussions / C#
   

C#

 
GeneralRe: making an icon for ur application Pin
Rocky#7-Dec-06 23:36
Rocky#7-Dec-06 23:36 
QuestionUsing MQSeries with C# :: Cannot connect to queue on remote server (dll error) Pin
ctsnavalur6-Dec-06 19:41
ctsnavalur6-Dec-06 19:41 
QuestionAttempt to store an element of the incorrect type into the array Pin
gurunathang6-Dec-06 18:31
gurunathang6-Dec-06 18:31 
AnswerRe: Attempt to store an element of the incorrect type into the array Pin
jdkulkarni6-Dec-06 18:37
jdkulkarni6-Dec-06 18:37 
AnswerRe: Attempt to store an element of the incorrect type into the array Pin
ednrgc7-Dec-06 1:57
ednrgc7-Dec-06 1:57 
Questionabout methods Pin
chinnivinay6-Dec-06 17:26
chinnivinay6-Dec-06 17:26 
AnswerRe: about methods Pin
Christian Graus6-Dec-06 17:40
protectorChristian Graus6-Dec-06 17:40 
AnswerRe: about methods Pin
jdkulkarni6-Dec-06 17:43
jdkulkarni6-Dec-06 17:43 
Virtual methods are those methods which you want to call using base class object with derived class reference.
namespace SomeCorpProject
{
    public class BaseBusinessObject
    {
        public BaseBusinessObject() 
        {
        }

        public virtual void VirtualMethod()
        {
            Console.WriteLine("Virtual method");
        }

        public override string ToString() 
        {
            return "BaseBusinessObject";
        }       
    }
}


namespace SomeCorpProject
{
    public class Capacitor : BaseBusinessObject
    {
        public Capacitor() 
        {
        }

        public static void StaticMethod()
        {
            Console.WriteLine("I am static, no need to create object of class.");
        }

        public override void VirtualMethod()
        {
            Console.WriteLine("In derived virtual method");
            base.VirtualMethod();
        }

        public override string ToString() 
        {
            return "Capacitor";
        }
    }
}


namespace SomeCorpProject
{
    class Class1 
    {
        [STAThread]
        static void Main(string[] args) 
        {
            BaseBusinessObject bizObj = new Capacitor();
            bizObj.VirtualMethod();
            Capacitor.StaticMethod();
            System.Console.WriteLine(bizObj.ToString());
        }
    }
}

The above code will explain most of the concepts. Static methods are those methods for which object of the class need not to be created. They share the common info across all class objects. They are loaded in the memory before class gets loaded. Dynamic methods? I do not have idea. But I think they might be instance methods. i.e. you should create an object of the class to call these methods. Smile | :)

Jayant D. Kulkarni
Brainbench Certified Software Engineer in C#, ASP.NET, .NET Framework and ADO.NET

GeneralRe: about methods Pin
Christian Graus6-Dec-06 18:08
protectorChristian Graus6-Dec-06 18:08 
GeneralRe: about methods Pin
ednrgc7-Dec-06 2:03
ednrgc7-Dec-06 2:03 
GeneralRe: about methods Pin
ednrgc7-Dec-06 2:05
ednrgc7-Dec-06 2:05 
AnswerRe: about methods Pin
User 16732526-Dec-06 17:59
User 16732526-Dec-06 17:59 
AnswerRe: about methods Pin
Bhupi Bhai6-Dec-06 19:30
Bhupi Bhai6-Dec-06 19:30 
QuestionExplore an assembly programatically... Pin
Super Lloyd6-Dec-06 15:58
Super Lloyd6-Dec-06 15:58 
AnswerRe: Explore an assembly programatically... Pin
Super Lloyd6-Dec-06 16:41
Super Lloyd6-Dec-06 16:41 
AnswerRe: Explore an assembly programatically... Pin
Super Lloyd6-Dec-06 18:47
Super Lloyd6-Dec-06 18:47 
QuestionRichTextBox Pin
ppp0016-Dec-06 15:47
ppp0016-Dec-06 15:47 
AnswerRe: RichTextBox Pin
mav.northwind10-Dec-06 18:48
mav.northwind10-Dec-06 18:48 
QuestionHow to import XML into Excel using C#? Pin
uberhacker6-Dec-06 11:59
uberhacker6-Dec-06 11:59 
QuestionComparing user input to array characters Pin
neptune2k6-Dec-06 11:43
neptune2k6-Dec-06 11:43 
AnswerRe: Comparing user input to array characters Pin
lost in transition 6-Dec-06 11:48
lost in transition 6-Dec-06 11:48 
GeneralRe: Comparing user input to array characters Pin
neptune2k6-Dec-06 12:02
neptune2k6-Dec-06 12:02 
AnswerRe: Comparing user input to array characters Pin
led mike6-Dec-06 12:02
led mike6-Dec-06 12:02 
QuestionOdd ListBox behavior with drag/drop enabled Pin
Dan Neely6-Dec-06 10:24
Dan Neely6-Dec-06 10:24 
AnswerRe: Odd ListBox behavior with drag/drop enabled Pin
Dan Neely6-Dec-06 10:57
Dan Neely6-Dec-06 10:57 

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.