Click here to Skip to main content
14,926,387 members
Home / Discussions / C#
   

C#

 
AnswerRe: check if a form is open Pin
Wendelius4-Sep-08 11:14
mveWendelius4-Sep-08 11:14 
GeneralRe: check if a form is open Pin
fghdmhmmd5-Sep-08 1:05
Memberfghdmhmmd5-Sep-08 1:05 
QuestionInterface Inheritance Pin
Aslesh4-Sep-08 4:28
MemberAslesh4-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
MemberAslesh4-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
MemberAslesh4-Sep-08 4:57 
GeneralRe: Interface Inheritance Pin
Robert.C.Cartaino4-Sep-08 5:18
MemberRobert.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
MemberRobert.C.Cartaino4-Sep-08 5:19 
QuestionHow do i clear a list box Pin
Wamuti4-Sep-08 4:20
MemberWamuti4-Sep-08 4:20 
AnswerRe: How do i clear a list box [modified] Pin
John Ad4-Sep-08 4:26
MemberJohn Ad4-Sep-08 4:26 
GeneralRe: How do i clear a list box Pin
Wamuti4-Sep-08 4:31
MemberWamuti4-Sep-08 4:31 
QuestionWhat is the difference - Convert.Int32() --- Int32.Parse() --- (int) Pin
dataminers4-Sep-08 3:53
Memberdataminers4-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
MemberGuffa4-Sep-08 6:53 
QuestionPause and Resume facility in a downloader application using C# Pin
Student Developer4-Sep-08 3:32
MemberStudent 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
mva#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
mva#realJSOP4-Sep-08 4:11 
AnswerRe: Secure Data Exchange Between WinfForm app and Web Service Pin
led mike4-Sep-08 5:29
Memberled mike4-Sep-08 5:29 
AnswerRe: Secure Data Exchange Between WinfForm app and Web Service Pin
leppie4-Sep-08 9:05
Memberleppie4-Sep-08 9:05 
GeneralRe: Secure Data Exchange Between WinfForm app and Web Service Pin
#realJSOP5-Sep-08 0:20
mva#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.