Click here to Skip to main content
15,886,091 members
Home / Discussions / C#
   

C#

 
GeneralRe: Interfaces and Collections Pin
Sentenryu5-Jan-12 7:11
Sentenryu5-Jan-12 7:11 
AnswerRe: Interfaces and Collections Pin
SledgeHammer015-Jan-12 10:38
SledgeHammer015-Jan-12 10:38 
QuestionRe: Interfaces and Collections Pin
Sentenryu5-Jan-12 10:48
Sentenryu5-Jan-12 10:48 
GeneralRe: Interfaces and Collections Pin
BillWoodruff5-Jan-12 16:46
professionalBillWoodruff5-Jan-12 16:46 
GeneralRe: Interfaces and Collections Pin
SledgeHammer015-Jan-12 16:59
SledgeHammer015-Jan-12 16:59 
AnswerRe: Interfaces and Collections Pin
BillWoodruff5-Jan-12 16:44
professionalBillWoodruff5-Jan-12 16:44 
GeneralRe: Interfaces and Collections Pin
SledgeHammer015-Jan-12 16:54
SledgeHammer015-Jan-12 16:54 
GeneralRe: Interfaces and Collections Pin
Sentenryu5-Jan-12 22:13
Sentenryu5-Jan-12 22:13 
BillWoodruff wrote:
Why do these compile ?


MSDN:

"The as operator is like a cast operation. However, if the conversion is not possible, as returns null instead of raising an exception." link to the "as" operator in msdn[^]

so, what happens is that the compiler doesn't care if your conversion always returns null.

i'm trying to instal the .net sdk in this computer (don't have admin privileges) to disassemble a dll and see what code the compiler generates for List<IGenericInterface> and for List<UsingGenericInterface> but i suppose that the List<IGenericInterface> implements IList<IGenericInterface> and IEnumerable<IGenericInterface> while List<UsingGenericInterface> implements IList<UsingGenericInterface>, IEnumerable<UsingGenericInterface> and, given that UsingGenericInterface implements IGenericInterface, the List<UsingGenericInterface> also implements IEnumerable<IGenericInterface>

if this is the case, then i think it's a design flaw of the compiler, but i wont take precipitated conclusions.
GeneralRe: Interfaces and Collections Pin
BillWoodruff5-Jan-12 23:16
professionalBillWoodruff5-Jan-12 23:16 
AnswerRe: Interfaces and Collections Pin
BobJanova9-Jan-12 0:17
BobJanova9-Jan-12 0:17 
QuestionRichTextBox.TextLength vs RichTextBox.Text.Length Pin
morglorf5-Jan-12 5:49
morglorf5-Jan-12 5:49 
AnswerRe: RichTextBox.TextLength vs RichTextBox.Text.Length Pin
morglorf5-Jan-12 6:18
morglorf5-Jan-12 6:18 
GeneralRe: RichTextBox.TextLength vs RichTextBox.Text.Length Pin
Ravi Bhavnani5-Jan-12 7:58
professionalRavi Bhavnani5-Jan-12 7:58 
QuestionHow to read ocr image in MODI using visual studio? Pin
pervaizali5-Jan-12 4:22
pervaizali5-Jan-12 4:22 
AnswerRe: How to read ocr image in MODI using visual studio? Pin
OriginalGriff5-Jan-12 4:44
mveOriginalGriff5-Jan-12 4:44 
QuestionHow to read ocr image in visual studio using MODI? Pin
pervaizali5-Jan-12 4:20
pervaizali5-Jan-12 4:20 
QuestionClipping Line in WPF Pin
nhuvayday4-Jan-12 17:30
nhuvayday4-Jan-12 17:30 
QuestionCan you run application (built in C#) from PC to Mobile phone via Bluetooth Pin
LAPEC4-Jan-12 13:28
LAPEC4-Jan-12 13:28 
AnswerRe: Can you run application (built in C#) from PC to Mobile phone via Bluetooth Pin
Dave Kreskowiak4-Jan-12 15:21
mveDave Kreskowiak4-Jan-12 15:21 
GeneralSeeking a C# mentor. Pin
Member 85400644-Jan-12 12:36
Member 85400644-Jan-12 12:36 
GeneralRe: Seeking a C# mentor. Pin
Richard Andrew x644-Jan-12 13:17
professionalRichard Andrew x644-Jan-12 13:17 
GeneralRe: Seeking a C# mentor. Pin
Member 85400644-Jan-12 13:40
Member 85400644-Jan-12 13:40 
GeneralRe: Seeking a C# mentor. Pin
fjdiewornncalwe5-Jan-12 4:40
professionalfjdiewornncalwe5-Jan-12 4:40 
QuestionFeedback on this Tree class design? Pin
SledgeHammer014-Jan-12 11:06
SledgeHammer014-Jan-12 11:06 
AnswerRe: Feedback on this Tree class design? Pin
Pete O'Hanlon5-Jan-12 2:37
mvePete O'Hanlon5-Jan-12 2:37 

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.