Click here to Skip to main content
15,915,164 members
Home / Discussions / C#
   

C#

 
GeneralRe: Practicing Passing Parameters Pin
Richard MacCutchan3-Jun-13 6:15
mveRichard MacCutchan3-Jun-13 6:15 
GeneralRe: Practicing Passing Parameters Pin
N8tiv3-Jun-13 21:01
N8tiv3-Jun-13 21:01 
GeneralRe: Practicing Passing Parameters Pin
Richard MacCutchan3-Jun-13 21:15
mveRichard MacCutchan3-Jun-13 21:15 
GeneralRe: Practicing Passing Parameters Pin
N8tiv3-Jun-13 3:46
N8tiv3-Jun-13 3:46 
GeneralRe: Practicing Passing Parameters Pin
Richard MacCutchan3-Jun-13 6:11
mveRichard MacCutchan3-Jun-13 6:11 
QuestionTo detect all USB devices. Pin
ravi inder jeet singh31-May-13 15:44
ravi inder jeet singh31-May-13 15:44 
AnswerRe: To detect all USB devices. Pin
Dave Kreskowiak1-Jun-13 6:51
mveDave Kreskowiak1-Jun-13 6:51 
QuestionSkype in C# Pin
Kevin Marois31-May-13 12:12
professionalKevin Marois31-May-13 12:12 
AnswerRe: Skype in C# Pin
Ron Beyer31-May-13 12:14
professionalRon Beyer31-May-13 12:14 
GeneralRe: Skype in C# Pin
Kevin Marois31-May-13 12:15
professionalKevin Marois31-May-13 12:15 
GeneralRe: Skype in C# Pin
Ron Beyer31-May-13 12:22
professionalRon Beyer31-May-13 12:22 
GeneralRe: Skype in C# Pin
Kevin Marois31-May-13 12:28
professionalKevin Marois31-May-13 12:28 
QuestionGeneric and Inheritance issue Pin
Revolty31-May-13 11:27
Revolty31-May-13 11:27 
I have the following interfaces, they must inherit in that order, the problem is that i can't make IVideoPlayer to return IVideo as Media. Is this not possible or am I missing something? I'd prefer not to have IAudioPlayer & IVideoPlayer as generic instances - but even if I am - is it possible at all?

I can only see that it would work if IVideoPlayer allso inherited IMediaPlayer<ivideo>, but I cant do that since IAudioPlayer already inherites it? My head hurts. D'Oh! | :doh:

public interface IMedia { }
public interface IAudio : IMedia { }
public interface IVideo : IAudio { }

public interface IMediaPlayer<T> where T : IMedia
{
    T Media { get; }
}

public interface IAudioPlayer : IMediaPlayer<IAudio>
{
    // Media is IAudio
}

public interface IVideoPlayer : IAudioPlayer
{
    // Media must be IVideo!
}

AnswerRe: Generic and Inheritance issue Pin
Ron Beyer31-May-13 12:02
professionalRon Beyer31-May-13 12:02 
GeneralRe: Generic and Inheritance issue Pin
Revolty31-May-13 12:52
Revolty31-May-13 12:52 
GeneralRe: Generic and Inheritance issue Pin
Revolty31-May-13 13:18
Revolty31-May-13 13:18 
AnswerRe: Generic and Inheritance issue Pin
Bernhard Hiller2-Jun-13 22:38
Bernhard Hiller2-Jun-13 22:38 
GeneralRe: Generic and Inheritance issue Pin
Revolty3-Jun-13 11:46
Revolty3-Jun-13 11:46 
AnswerRe: Generic and Inheritance issue Pin
Keld Ølykke3-Jun-13 20:10
Keld Ølykke3-Jun-13 20:10 
Question24 bit to 16 bit on the fly Pin
fachura31-May-13 4:49
fachura31-May-13 4:49 
AnswerRe: 24 bit to 16 bit on the fly Pin
Bernhard Hiller2-Jun-13 22:42
Bernhard Hiller2-Jun-13 22:42 
QuestionCalculate code complexity Pin
gastonbed30-May-13 22:49
gastonbed30-May-13 22:49 
QuestionRe: Calculate code complexity Pin
Eddy Vluggen30-May-13 23:40
professionalEddy Vluggen30-May-13 23:40 
AnswerRe: Calculate code complexity Pin
Alan Balkany31-May-13 4:56
Alan Balkany31-May-13 4:56 
GeneralRe: Calculate code complexity Pin
Eddy Vluggen31-May-13 6:25
professionalEddy Vluggen31-May-13 6:25 

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.