Click here to Skip to main content
15,897,518 members
Home / Discussions / C#
   

C#

 
Generalarray issue Pin
Paul Swet24-Sep-04 8:38
Paul Swet24-Sep-04 8:38 
GeneralRe: array issue Pin
tdciDoug24-Sep-04 10:27
tdciDoug24-Sep-04 10:27 
GeneralWeird Listbox Problem Pin
Jon G24-Sep-04 8:38
Jon G24-Sep-04 8:38 
GeneralScanning photos Pin
bobbiek24-Sep-04 8:15
bobbiek24-Sep-04 8:15 
Questionwhat is the purpose of a interface(not talking about guis) Pin
FocusedWolf24-Sep-04 7:53
FocusedWolf24-Sep-04 7:53 
AnswerRe: what is the purpose of a interface(not talking about guis) Pin
tajbender24-Sep-04 13:01
tajbender24-Sep-04 13:01 
AnswerRe: what is the purpose of a interface(not talking about guis) Pin
Marc Clifton24-Sep-04 14:21
mvaMarc Clifton24-Sep-04 14:21 
GeneralRe: what is the purpose of a interface(not talking about guis) Pin
FocusedWolf25-Sep-04 5:06
FocusedWolf25-Sep-04 5:06 
Wow i think i understand them now! So interfaces were made solely to make sure people deriving from a class followed the same naming conventions and provided for the same functionality in their classes?

Here's a test program i wrote that helped me out:

#region Using directives

using System;
using System.Collections.Generic;
using System.Text;

#endregion

namespace ConsoleApplication1
{
interface Wolf
{
string Fur{get; set;}
string Teeth{get; set;}

void Hunger(string food);
}

class WereWolf : Wolf
{
public WereWolf()
{
Console.Write("WereWolf mode engaged\n\n");
}

private string fur;
public string Fur
{
get { return this.fur; }
set { this.fur = value; }
}

private string teeth;
public string Teeth
{
get { return this.teeth; }
set { this.teeth = value; }
}

public void Hunger(string food)
{
string chew = food;
}
}

class RealWolf : Wolf
{
public RealWolf()
{
Console.Write("RealWolf mode engaged\n\n");
}

private string fur;
public string Fur
{
get { return this.fur; }
set { this.fur = value; }
}

private string teeth;
public string Teeth
{
get { return this.teeth; }
set { this.teeth = value; }
}

public void Hunger(string food)
{
string chew = food;
}
}

class Program : WereWolf
{
static void Main()
{
WereWolf were = new WereWolf();

Console.Write("What color is the wolf that's chewing on you? ");
were.Fur = Console.ReadLine();

Console.Write("How many teeth does it have? ");
were.Teeth = Console.ReadLine();

}
}
}
GeneralRe: what is the purpose of a interface(not talking about guis) Pin
Marc Clifton25-Sep-04 9:23
mvaMarc Clifton25-Sep-04 9:23 
Generalrich text bullets are not displayed in Crystal report. .net 2003 Pin
sundar_raj24-Sep-04 6:53
sundar_raj24-Sep-04 6:53 
GeneralC# Convolution Function Pin
ee9903524-Sep-04 6:27
ee9903524-Sep-04 6:27 
GeneralRe: C# Convolution Function Pin
yoaz26-Sep-04 3:59
yoaz26-Sep-04 3:59 
QuestionHow to read image files with extensions which are not predefined in C# Pin
Kiran Satish24-Sep-04 6:14
Kiran Satish24-Sep-04 6:14 
AnswerRe: How to read image files with extensions which are not predefined in C# Pin
Colin Angus Mackay24-Sep-04 6:54
Colin Angus Mackay24-Sep-04 6:54 
GeneralRe: How to read image files with extensions which are not predefined in C# Pin
Kiran Satish24-Sep-04 7:14
Kiran Satish24-Sep-04 7:14 
Generalfinding a record in a table Pin
steve_rm24-Sep-04 5:30
steve_rm24-Sep-04 5:30 
GeneralRe: finding a record in a table Pin
Heath Stewart24-Sep-04 6:44
protectorHeath Stewart24-Sep-04 6:44 
GeneralRe: finding a record in a table Pin
Brian Delahunty24-Sep-04 12:34
Brian Delahunty24-Sep-04 12:34 
GeneralRe: finding a record in a table Pin
Heath Stewart24-Sep-04 15:01
protectorHeath Stewart24-Sep-04 15:01 
GeneralI remembered! Pin
eggie524-Sep-04 16:32
eggie524-Sep-04 16:32 
GeneralRe: I remembered! Pin
Heath Stewart25-Sep-04 9:19
protectorHeath Stewart25-Sep-04 9:19 
GeneralRe: I remembered! Pin
eggie525-Sep-04 11:08
eggie525-Sep-04 11:08 
GeneralRe: finding a record in a table Pin
Brian Delahunty25-Sep-04 0:04
Brian Delahunty25-Sep-04 0:04 
GeneralRe: finding a record in a table Pin
Heath Stewart25-Sep-04 9:24
protectorHeath Stewart25-Sep-04 9:24 
GeneralIE Hosted UserControl Pin
OBRon24-Sep-04 3:24
OBRon24-Sep-04 3:24 

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.