Click here to Skip to main content
15,884,629 members
Home / Discussions / C#
   

C#

 
AnswerRe: check if a form is open Pin
Wendelius4-Sep-08 11:14
mentorWendelius4-Sep-08 11:14 
GeneralRe: check if a form is open Pin
fghdmhmmd5-Sep-08 1:05
fghdmhmmd5-Sep-08 1:05 
QuestionInterface Inheritance Pin
Aslesh4-Sep-08 4:28
Aslesh4-Sep-08 4:28 
AnswerRe: Interface Inheritance Pin
DaveyM694-Sep-08 4:37
professionalDaveyM694-Sep-08 4:37 
GeneralRe: Interface Inheritance Pin
Aslesh4-Sep-08 4:42
Aslesh4-Sep-08 4:42 
GeneralRe: Interface Inheritance Pin
DaveyM694-Sep-08 4:49
professionalDaveyM694-Sep-08 4:49 
GeneralRe: Interface Inheritance Pin
Aslesh4-Sep-08 4:57
Aslesh4-Sep-08 4:57 
GeneralRe: Interface Inheritance Pin
Robert.C.Cartaino4-Sep-08 5:18
Robert.C.Cartaino4-Sep-08 5:18 
Try this and see if the previous answer makes any more sense:

using System;

interface IA
{ 
<code>    // There is no code here. Just a "requirement" that you need
    // to implement a method called CodeProject().</code>
    void CodeProject();
}

interface IB
{
<code>    // IB also says that you are required to implement a method called CodeProject().</code>
    void CodeProject();
}

public class Code : IA, IB
{
<code>    // By inheriting from IA (or IB), what you are saying is that 
    // you are required to implement a method called CodeProject().
    // IA and IB just happen to have the same requirement.
    // Here it is.</code>
    public void CodeProject()
    {
        Console.WriteLine("This is the CodeProject() method.");
    }
}

class Program
{
    static void Main(string[] args)
    {
        Code c = new Code();
        c.CodeProject();
    }
}


A couple of quick notes:

Interfaces are named with a leading letter "I", by convention (for example, IDisposable).

Methods defined in interfaces are automatically public. You cannot use the public modifier in the interface/method definition.

Enjoy,

Robert C. Cartaino
GeneralRe: Interface Inheritance Pin
Robert.C.Cartaino4-Sep-08 5:19
Robert.C.Cartaino4-Sep-08 5:19 
QuestionHow do i clear a list box Pin
Wamuti4-Sep-08 4:20
Wamuti4-Sep-08 4:20 
AnswerRe: How do i clear a list box [modified] Pin
John Ad4-Sep-08 4:26
John Ad4-Sep-08 4:26 
GeneralRe: How do i clear a list box Pin
Wamuti4-Sep-08 4:31
Wamuti4-Sep-08 4:31 
QuestionWhat is the difference - Convert.Int32() --- Int32.Parse() --- (int) Pin
dataminers4-Sep-08 3:53
dataminers4-Sep-08 3:53 
AnswerRe: What is the difference - Convert.Int32() --- Int32.Parse() --- (int) Pin
Ravi Bhavnani4-Sep-08 3:56
professionalRavi Bhavnani4-Sep-08 3:56 
AnswerRe: What is the difference - Convert.Int32() --- Int32.Parse() --- (int) Pin
DaveyM694-Sep-08 4:09
professionalDaveyM694-Sep-08 4:09 
AnswerRe: What is the difference - Convert.Int32() --- Int32.Parse() --- (int) Pin
Guffa4-Sep-08 6:53
Guffa4-Sep-08 6:53 
QuestionPause and Resume facility in a downloader application using C# Pin
Student Developer4-Sep-08 3:32
Student Developer4-Sep-08 3:32 
AnswerRe: Pause and Resume facility in a downloader application using C# Pin
Ravi Bhavnani4-Sep-08 3:54
professionalRavi Bhavnani4-Sep-08 3:54 
QuestionSecure Data Exchange Between WinfForm app and Web Service Pin
#realJSOP4-Sep-08 3:22
mve#realJSOP4-Sep-08 3:22 
AnswerRe: Secure Data Exchange Between WinfForm app and Web Service Pin
Manas Bhardwaj4-Sep-08 3:27
professionalManas Bhardwaj4-Sep-08 3:27 
AnswerRe: Secure Data Exchange Between WinfForm app and Web Service Pin
Ravi Bhavnani4-Sep-08 4:02
professionalRavi Bhavnani4-Sep-08 4:02 
GeneralRe: Secure Data Exchange Between WinfForm app and Web Service Pin
#realJSOP4-Sep-08 4:11
mve#realJSOP4-Sep-08 4:11 
AnswerRe: Secure Data Exchange Between WinfForm app and Web Service Pin
led mike4-Sep-08 5:29
led mike4-Sep-08 5:29 
AnswerRe: Secure Data Exchange Between WinfForm app and Web Service Pin
leppie4-Sep-08 9:05
leppie4-Sep-08 9:05 
GeneralRe: Secure Data Exchange Between WinfForm app and Web Service Pin
#realJSOP5-Sep-08 0:20
mve#realJSOP5-Sep-08 0:20 

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.