Click here to Skip to main content
15,921,463 members
Home / Discussions / C#
   

C#

 
AnswerRe: FileName with Directory.GetFiles Pin
Aaron Dilliard7-Apr-06 9:14
Aaron Dilliard7-Apr-06 9:14 
Questionhow to load xml file in c# Pin
ybasha6-Apr-06 17:53
ybasha6-Apr-06 17:53 
QuestionHow to save the text of listbox in hashtable? Pin
njcgf6-Apr-06 17:41
njcgf6-Apr-06 17:41 
AnswerRe: How to save the text of listbox in hashtable? Pin
scoroop6-Apr-06 21:58
scoroop6-Apr-06 21:58 
QuestionA question about Panel Pin
flyinglimy6-Apr-06 17:05
flyinglimy6-Apr-06 17:05 
QuestionInterface Implementation - Returning Inherited Class Pin
sebaaaa6-Apr-06 14:19
sebaaaa6-Apr-06 14:19 
AnswerRe: Interface Implementation - Returning Inherited Class Pin
Ferry Mulyono6-Apr-06 15:05
Ferry Mulyono6-Apr-06 15:05 
AnswerRe: Interface Implementation - Returning Inherited Class Pin
Robert Rohde7-Apr-06 2:10
Robert Rohde7-Apr-06 2:10 
The problem is that the interface says the Property has to be of type IBehavior and not Behaviorclass. To have a typesafe accessor in Itemclass and still adhere to the interface do the following:

public class Itemclass : IBehaviorActing
{
public Behaviorclass Behavior
{
get {...}
}

IBehavior IBehaviorActing.Behavior {
get { this.Behavior; }
}
}

The compiler will call the normal Behavior property whenever you access Behavior via the concrete class. Whenever it is accessed via an interface variable it will access the interface implemenation (which in turn calls the typesafe one).

I regulary use these constructs. It's also extremely useful when working with the ICloneable interface.
QuestionScientific calculator in C# Pin
Ronald246-Apr-06 13:48
Ronald246-Apr-06 13:48 
QuestionPixelation in Scaled GIF images Pin
Citizen_RobertK6-Apr-06 13:24
Citizen_RobertK6-Apr-06 13:24 
QuestionHide web service details? Pin
Mark Tutt6-Apr-06 12:56
Mark Tutt6-Apr-06 12:56 
AnswerRe: Hide web service details? Pin
Ferry Mulyono6-Apr-06 15:13
Ferry Mulyono6-Apr-06 15:13 
GeneralRe: Hide web service details? Pin
Mark Tutt6-Apr-06 15:41
Mark Tutt6-Apr-06 15:41 
GeneralRe: Hide web service details? Pin
Ferry Mulyono6-Apr-06 16:01
Ferry Mulyono6-Apr-06 16:01 
GeneralRe: Hide web service details? Pin
Mark Tutt6-Apr-06 16:35
Mark Tutt6-Apr-06 16:35 
QuestionPass SerialPort variable to another class. Pin
shultas6-Apr-06 12:03
shultas6-Apr-06 12:03 
AnswerRe: Pass SerialPort variable to another class. Pin
Judah Gabriel Himango6-Apr-06 12:32
sponsorJudah Gabriel Himango6-Apr-06 12:32 
AnswerRe: Pass SerialPort variable to another class. Pin
Stefan Troschuetz6-Apr-06 12:35
Stefan Troschuetz6-Apr-06 12:35 
GeneralRe: Pass SerialPort variable to another class. Pin
shultas6-Apr-06 12:49
shultas6-Apr-06 12:49 
GeneralRe: Pass SerialPort variable to another class. Pin
Stefan Troschuetz6-Apr-06 22:48
Stefan Troschuetz6-Apr-06 22:48 
QuestionMaybe not an interesting question, but... Pin
Stanciu Vlad6-Apr-06 11:55
Stanciu Vlad6-Apr-06 11:55 
AnswerRe: Maybe not an interesting question, but... Pin
Judah Gabriel Himango6-Apr-06 12:24
sponsorJudah Gabriel Himango6-Apr-06 12:24 
GeneralRe: Maybe not an interesting question, but... Pin
Stanciu Vlad6-Apr-06 22:33
Stanciu Vlad6-Apr-06 22:33 
GeneralRe: Maybe not an interesting question, but... Pin
Judah Gabriel Himango7-Apr-06 4:01
sponsorJudah Gabriel Himango7-Apr-06 4:01 
AnswerRe: Maybe not an interesting question, but... Pin
Graham Nimbley6-Apr-06 15:55
Graham Nimbley6-Apr-06 15:55 

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.