Click here to Skip to main content
15,896,111 members
Home / Discussions / C#
   

C#

 
GeneralRe: Error msg conveying that a number is invalid because of Two dots within a real number in c# Pin
Eddy Vluggen11-Apr-14 7:48
professionalEddy Vluggen11-Apr-14 7:48 
QuestionOpen file image with inform C# Pin
Member 1039071511-Apr-14 6:38
Member 1039071511-Apr-14 6:38 
AnswerRe: Open file image with inform C# Pin
Dave Kreskowiak11-Apr-14 7:00
mveDave Kreskowiak11-Apr-14 7:00 
GeneralRe: Open file image with inform C# Pin
Member 1039071511-Apr-14 8:07
Member 1039071511-Apr-14 8:07 
GeneralRe: Open file image with inform C# Pin
Dave Kreskowiak11-Apr-14 9:09
mveDave Kreskowiak11-Apr-14 9:09 
Questiondownload a file from google drive Pin
BODEMPUDI_CHOWDARY11-Apr-14 4:38
BODEMPUDI_CHOWDARY11-Apr-14 4:38 
AnswerRe: download a file from google drive Pin
Richard MacCutchan11-Apr-14 4:56
mveRichard MacCutchan11-Apr-14 4:56 
AnswerRe: download a file from google drive Pin
Mycroft Holmes11-Apr-14 13:45
professionalMycroft Holmes11-Apr-14 13:45 
QuestionStoring deserialized data into SQL Server Ce using Entity Framework code first Pin
sifi mohamed amine10-Apr-14 23:12
sifi mohamed amine10-Apr-14 23:12 
AnswerRe: Storing deserialized data into SQL Server Ce using Entity Framework code first Pin
Dave Kreskowiak11-Apr-14 6:59
mveDave Kreskowiak11-Apr-14 6:59 
QuestionToolStripMenuItem color becomes white after clicking Pin
Aaditya Hasiyan10-Apr-14 21:38
Aaditya Hasiyan10-Apr-14 21:38 
QuestionWhat is Lock in C# Pin
Ravindra Bisen10-Apr-14 20:39
Ravindra Bisen10-Apr-14 20:39 
AnswerRe: What is Lock in C# Pin
Peter Leow10-Apr-14 20:44
professionalPeter Leow10-Apr-14 20:44 
AnswerRe: What is Lock in C# Pin
OriginalGriff10-Apr-14 21:41
mveOriginalGriff10-Apr-14 21:41 
GeneralRe: What is Lock in C# Pin
harold aptroot10-Apr-14 22:36
harold aptroot10-Apr-14 22:36 
QuestionWeird Linq error (Ignore this) Pin
Mycroft Holmes10-Apr-14 14:30
professionalMycroft Holmes10-Apr-14 14:30 
AnswerRe: Weird Linq error Pin
Dave Kreskowiak10-Apr-14 14:37
mveDave Kreskowiak10-Apr-14 14:37 
GeneralRe: Weird Linq error Pin
Mycroft Holmes10-Apr-14 19:21
professionalMycroft Holmes10-Apr-14 19:21 
GeneralRe: Weird Linq error Pin
Dave Kreskowiak11-Apr-14 6:56
mveDave Kreskowiak11-Apr-14 6:56 
QuestionGraphic in C# Pin
Member 1068390210-Apr-14 6:03
Member 1068390210-Apr-14 6:03 
AnswerRe: Graphic in C# Pin
Richard MacCutchan10-Apr-14 6:29
mveRichard MacCutchan10-Apr-14 6:29 
GeneralRe: Graphic in C# Pin
Member 1068390211-Apr-14 6:05
Member 1068390211-Apr-14 6:05 
AnswerRe: Graphic in C# Pin
V.10-Apr-14 22:53
professionalV.10-Apr-14 22:53 
AnswerRe: Graphic in C# Pin
Bernhard Hiller10-Apr-14 22:57
Bernhard Hiller10-Apr-14 22:57 
Questionchange interface type to other interface type Pin
Nico Haegens10-Apr-14 4:28
professionalNico Haegens10-Apr-14 4:28 
I have a class that implements 2 interfaces.
I have a property that is of the type of one of those 2 interfaces.
Problem is, I want to use the other interface.

So class A implements interfaces B(my own interface) & C(third party interface).
In class D, I have a property E of type C.
How do I cast property E to type B?
ICustomControl control = (ICustomControl)Component;

is basically what I'm trying to do. But I get an exception when I try to do that.
the value of Component is a class that inherits from interface ICustomControl. The property Component is of type IComponent.
Any help would be appreciated.

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.