Click here to Skip to main content
16,006,001 members
Home / Discussions / C#
   

C#

 
GeneralRe: Problme passing Double Quotes (") to query Pin
kubben1-May-07 8:49
kubben1-May-07 8:49 
GeneralRe: Problme passing Double Quotes (") to query Pin
Muhammad Nauman Yousuf1-May-07 8:51
Muhammad Nauman Yousuf1-May-07 8:51 
QuestionCannot implicitly convert type 'System.Windows.Forms.ContextMenuStrip' Pin
Latheesan1-May-07 6:40
Latheesan1-May-07 6:40 
AnswerRe: Cannot implicitly convert type 'System.Windows.Forms.ContextMenuStrip' Pin
Tarakeshwar Reddy1-May-07 6:57
professionalTarakeshwar Reddy1-May-07 6:57 
GeneralRe: Cannot implicitly convert type 'System.Windows.Forms.ContextMenuStrip' Pin
Latheesan1-May-07 8:34
Latheesan1-May-07 8:34 
Questiondataset filter Pin
arkiboys1-May-07 6:21
arkiboys1-May-07 6:21 
AnswerRe: dataset filter Pin
Tarakeshwar Reddy1-May-07 7:02
professionalTarakeshwar Reddy1-May-07 7:02 
QuestionUrgent Reflection / Casting issue Pin
Program.X1-May-07 6:15
Program.X1-May-07 6:15 
Hi,

This ia quite an urgent problem I have here, my project is slipping too far and I have a racing festival to launch my code for very soon so any help would be appreciated!

I have the following code, which is broken down into a more managable form, during the debugging process:

1: object o=new MembershipLevel().FindByItemCode(itemCode);
2: MembershipLevel membershipLevel=o as MembershipLevel;

Now, line 1 successfully extracts a record from the database and populates o accrdingly, with a MembershipLevel object. It's great, I can see it's the correct record, and it is the correct type.

Line 2 is used to cast the type into something so I can get at the data inside it. However, this cast fails. In its original shorthand form of { MembershipLevel membershipLevel=(MembershipLevel)o }, this threw an exception InvalidCast excpetion saying "Cannot cast MembershipLevel into MembershipLevel", so it knows the types are same, but it will not cast it!

MembershipLevel has been loaded via reflection from the web site bin folder. Interestingly, a previous object has also been loaded using the same method and that works fine. Also, this code is in the same assembly. The assembly is present and correct.

Any help appreciated Smile | :)
AnswerRe: Urgent Reflection / Casting issue Pin
Ian Shlasko1-May-07 8:29
Ian Shlasko1-May-07 8:29 
GeneralRe: Urgent Reflection / Casting issue Pin
Program.X1-May-07 8:39
Program.X1-May-07 8:39 
GeneralRe: Urgent Reflection / Casting issue Pin
Ian Shlasko1-May-07 8:57
Ian Shlasko1-May-07 8:57 
GeneralRe: Urgent Reflection / Casting issue Pin
LongRange.Shooter1-May-07 10:27
LongRange.Shooter1-May-07 10:27 
GeneralRe: Urgent Reflection / Casting issue Pin
LongRange.Shooter1-May-07 10:29
LongRange.Shooter1-May-07 10:29 
GeneralRe: Urgent Reflection / Casting issue Pin
Program.X1-May-07 10:44
Program.X1-May-07 10:44 
GeneralRe: Urgent Reflection / Casting issue Pin
Program.X2-May-07 0:24
Program.X2-May-07 0:24 
GeneralRe: Urgent Reflection / Casting issue Pin
Program.X2-May-07 0:43
Program.X2-May-07 0:43 
AnswerRe: Urgent Reflection / Casting issue Pin
DavidNohejl1-May-07 11:11
DavidNohejl1-May-07 11:11 
Questionadd a control to DataGridView Pin
Mohammed Elkholy1-May-07 6:11
Mohammed Elkholy1-May-07 6:11 
AnswerRe: add a control to DataGridView Pin
LongRange.Shooter1-May-07 10:30
LongRange.Shooter1-May-07 10:30 
GeneralRe: add a control to DataGridView Pin
Mohammed Elkholy1-May-07 10:39
Mohammed Elkholy1-May-07 10:39 
GeneralRe: add a control to DataGridView Pin
LongRange.Shooter1-May-07 10:48
LongRange.Shooter1-May-07 10:48 
GeneralRe: add a control to DataGridView Pin
Keshav V. Kamat1-May-07 23:32
Keshav V. Kamat1-May-07 23:32 
QuestionFailed Assertion??? Pin
Justin Perez1-May-07 5:51
Justin Perez1-May-07 5:51 
AnswerRe: Failed Assertion??? Pin
CPallini1-May-07 7:21
mveCPallini1-May-07 7:21 
GeneralRe: Failed Assertion??? [modified] Pin
Justin Perez1-May-07 10:35
Justin Perez1-May-07 10:35 

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.