Click here to Skip to main content
16,005,316 members
Home / Discussions / C#
   

C#

 
GeneralRe: Problem with FieldInfo SetValue Pin
Gedrain10-Nov-04 8:46
Gedrain10-Nov-04 8:46 
GeneralRe: Problem with FieldInfo SetValue Pin
Heath Stewart10-Nov-04 8:53
protectorHeath Stewart10-Nov-04 8:53 
GeneralRe: Problem with FieldInfo SetValue Pin
Gedrain10-Nov-04 8:56
Gedrain10-Nov-04 8:56 
GeneralRe: Problem with FieldInfo SetValue Pin
Heath Stewart10-Nov-04 9:06
protectorHeath Stewart10-Nov-04 9:06 
GeneralRe: Problem with FieldInfo SetValue Pin
Gedrain10-Nov-04 9:10
Gedrain10-Nov-04 9:10 
GeneralRe: Problem with FieldInfo SetValue Pin
Heath Stewart10-Nov-04 9:25
protectorHeath Stewart10-Nov-04 9:25 
GeneralRe: Problem with FieldInfo SetValue Pin
Gedrain10-Nov-04 9:46
Gedrain10-Nov-04 9:46 
GeneralRe: Problem with FieldInfo SetValue Pin
Heath Stewart10-Nov-04 9:56
protectorHeath Stewart10-Nov-04 9:56 
An exception should be thrown. You don't have this code in try-catch already, do you? If the field can't be found, an exception is thrown. The the value type and field types don't match, an exception is thrown. If any of the objects are null an exception is thrown.

Setting values through reflection works - I've done it hundreds of times in a very similar fashion. What I'm not seeing is the relevent code necessary to see what is wrong. You posted your for loop, fine. But what about the contact variable type?

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: Problem with FieldInfo SetValue Pin
Gedrain10-Nov-04 10:14
Gedrain10-Nov-04 10:14 
GeneralRe: Problem with FieldInfo SetValue Pin
Heath Stewart10-Nov-04 10:50
protectorHeath Stewart10-Nov-04 10:50 
GeneralRe: Problem with FieldInfo SetValue Pin
Gedrain10-Nov-04 10:52
Gedrain10-Nov-04 10:52 
GeneralRe: Problem with FieldInfo SetValue Pin
Heath Stewart10-Nov-04 10:58
protectorHeath Stewart10-Nov-04 10:58 
GeneralRe: Problem with FieldInfo SetValue Pin
Gedrain10-Nov-04 11:14
Gedrain10-Nov-04 11:14 
GeneralRe: Problem with FieldInfo SetValue Pin
Nnamdi Onyeyiri10-Nov-04 8:42
Nnamdi Onyeyiri10-Nov-04 8:42 
General.wav playback problem in C# Pin
Codesmith200310-Nov-04 8:28
Codesmith200310-Nov-04 8:28 
GeneralRe: .wav playback problem in C# Pin
Codesmith200310-Nov-04 8:49
Codesmith200310-Nov-04 8:49 
GeneralRe: .wav playback problem in C# Pin
Anonymous10-Nov-04 16:05
Anonymous10-Nov-04 16:05 
GeneralC# windows service using Word Pin
Nick Ingratta10-Nov-04 8:08
Nick Ingratta10-Nov-04 8:08 
GeneralRe: C# windows service using Word Pin
Heath Stewart10-Nov-04 8:44
protectorHeath Stewart10-Nov-04 8:44 
GeneralRe: C# windows service using Word Pin
Nick Ingratta10-Nov-04 8:57
Nick Ingratta10-Nov-04 8:57 
GeneralRe: C# windows service using Word Pin
Heath Stewart10-Nov-04 9:09
protectorHeath Stewart10-Nov-04 9:09 
GeneralRe: C# windows service using Word Pin
Nick Ingratta11-Nov-04 4:15
Nick Ingratta11-Nov-04 4:15 
GeneralRe: C# windows service using Word Pin
Heath Stewart11-Nov-04 6:30
protectorHeath Stewart11-Nov-04 6:30 
GeneralRe: C# windows service using Word Pin
Nick Ingratta11-Nov-04 6:34
Nick Ingratta11-Nov-04 6:34 
GeneralRe: C# windows service using Word Pin
Heath Stewart11-Nov-04 6:37
protectorHeath Stewart11-Nov-04 6: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.