Click here to Skip to main content
15,913,854 members
Home / Discussions / C#
   

C#

 
AnswerRe: repeater problem Pin
J$30-Mar-07 11:11
J$30-Mar-07 11:11 
Questionobject oriented doubt Pin
kalyan_241630-Mar-07 0:23
kalyan_241630-Mar-07 0:23 
AnswerRe: object oriented doubt Pin
Colin Angus Mackay30-Mar-07 0:27
Colin Angus Mackay30-Mar-07 0:27 
GeneralRe: object oriented doubt Pin
kalyan_241630-Mar-07 0:35
kalyan_241630-Mar-07 0:35 
GeneralRe: object oriented doubt Pin
Colin Angus Mackay30-Mar-07 1:24
Colin Angus Mackay30-Mar-07 1:24 
AnswerRe: object oriented doubt Pin
Christian Graus30-Mar-07 3:18
protectorChristian Graus30-Mar-07 3:18 
Questionfiltering data for dataset that is bound to grid Pin
JacquesDP29-Mar-07 23:58
JacquesDP29-Mar-07 23:58 
AnswerRe: filtering data for dataset that is bound to grid Pin
gauthee30-Mar-07 0:08
gauthee30-Mar-07 0:08 
GeneralRe: filtering data for dataset that is bound to grid Pin
JacquesDP30-Mar-07 0:13
JacquesDP30-Mar-07 0:13 
GeneralRe: filtering data for dataset that is bound to grid Pin
kalyan_241630-Mar-07 0:39
kalyan_241630-Mar-07 0:39 
GeneralRe: filtering data for dataset that is bound to grid Pin
JacquesDP30-Mar-07 1:20
JacquesDP30-Mar-07 1:20 
GeneralRe: filtering data for dataset that is bound to grid Pin
gauthee30-Mar-07 1:34
gauthee30-Mar-07 1:34 
QuestionSome data Decrypt to return error Length of the data to decrypt is invalid Pin
alpaslanaykovan29-Mar-07 23:57
alpaslanaykovan29-Mar-07 23:57 
AnswerRe: Some data Decrypt to return error Length of the data to decrypt is invalid Pin
Ennis Ray Lynch, Jr.30-Mar-07 4:04
Ennis Ray Lynch, Jr.30-Mar-07 4:04 
QuestionInheritance and reflection Pin
Russell Jones29-Mar-07 23:15
Russell Jones29-Mar-07 23:15 
I've got an abstract base class containing a guild field called _id.

I've derived some classes from my base class.

1 class has overridden the _id field and one hasn't.

My problem is that the object that doesn't override the _id field fails on the SetValue() call with Field == null so i get 'Object reference not set...'

public static void InjectID(Guid id,AbstractBase dataObject)<br />
{<br />
   //Type abstractBaseType = typeof(AbstractBase);<br />
   Type abstractBaseType = dataObject.GetType();<br />
   FieldInfo Field = abstractBaseType .GetField("_id");<br />
   Field.SetValue(dataObject, id);<br />
}<br />


The commented out line was my original code and the line below it was an attempted fix, but both behave in the same way.

Is there a way of getting to the fields defined in a base class?

Thanks

Russell
AnswerRe: Inheritance and reflection Pin
Stefan Troschuetz29-Mar-07 23:36
Stefan Troschuetz29-Mar-07 23:36 
GeneralRe: Inheritance and reflection Pin
Russell Jones30-Mar-07 0:00
Russell Jones30-Mar-07 0:00 
AnswerRe: Inheritance and reflection Pin
DavidNohejl29-Mar-07 23:59
DavidNohejl29-Mar-07 23:59 
GeneralRe: Inheritance and reflection Pin
Russell Jones30-Mar-07 0:40
Russell Jones30-Mar-07 0:40 
GeneralRe: Inheritance and reflection Pin
DavidNohejl30-Mar-07 0:54
DavidNohejl30-Mar-07 0:54 
GeneralRe: Inheritance and reflection Pin
Russell Jones30-Mar-07 2:14
Russell Jones30-Mar-07 2:14 
QuestionProblems when removing from ListBox Pin
sinosoidal29-Mar-07 22:56
sinosoidal29-Mar-07 22:56 
AnswerRe: Problems when removing from ListBox Pin
Russell Jones29-Mar-07 23:30
Russell Jones29-Mar-07 23:30 
AnswerRe: Problems when removing from ListBox Pin
sinosoidal30-Mar-07 0:40
sinosoidal30-Mar-07 0:40 
QuestionCreating a custom Vista HotFix INstaller..plz help Pin
ke3p_up29-Mar-07 22:34
ke3p_up29-Mar-07 22:34 

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.