Click here to Skip to main content
15,889,462 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: use of attributes to modify method behavior Pin
Sendilkumar.M20-Jul-04 0:31
Sendilkumar.M20-Jul-04 0:31 
GeneralInterop: inter thread communication and array issue Pin
RLebrun13-Jul-04 3:52
RLebrun13-Jul-04 3:52 
GeneralSerial port in Windows CE Pin
shayro13-Jul-04 1:03
shayro13-Jul-04 1:03 
QuestionHow to capture requests and responses Pin
shanit12-Jul-04 17:25
shanit12-Jul-04 17:25 
AnswerRe: How to capture requests and responses Pin
Javier Lozano20-Jul-04 12:51
Javier Lozano20-Jul-04 12:51 
GeneralA serious bug of list View in compact framework Pin
ting66812-Jul-04 0:15
ting66812-Jul-04 0:15 
GeneralPocketPC to Smart Phone Pin
Nefertiti11-Jul-04 18:36
Nefertiti11-Jul-04 18:36 
GeneralReflection-[Waiting for 2 days ] Pin
Sendilkumar.M9-Jul-04 21:13
Sendilkumar.M9-Jul-04 21:13 
Confused | :confused:
Hi!
I am developing a mulititier application.
I created some value classes with custom attributes specification.And i have seperate query builder class.This query builder class will construct the query based on the valueobject.Internally the query builder using reflection
reads all propertie's name and custome attributes.Upto that there is no problem.If i try to fetch the value of a property then the runtime error will occurs.For fetching the value i am using PropertyInfo.GetValue method.

So please any on help me to resolve this problem..

Type type=Obj.GetType();
foreach(PropertyInfo f in type.GetProperties())
{
foreach(Attribute attr in Attribute.GetCustomAttributes(f))
{
if(attr.GetType()==typeof(DefaultValueAttribute))
{
str+=":"+f.Name+":"+((ColumnMappingAttribute)attr).Name;
str+=f.GetValue(null,null); --This line shows error
}
}
}

Please help me to solove the problem






M.Sendilkumar
Senior Software Engineer
TVS Infotech
Chennai,TamilNadu,India.
98413 27002
GeneralRe: Reflection-[Waiting for 2 days ] Pin
Roman Rodov15-Jul-04 15:16
Roman Rodov15-Jul-04 15:16 
GeneralTHANKING YOU Pin
Sendilkumar.M15-Jul-04 17:31
Sendilkumar.M15-Jul-04 17:31 
Generallike PotMssage and User define message Pin
kobybr9-Jul-04 9:11
kobybr9-Jul-04 9:11 
GeneralRe: like PotMssage and User define message Pin
mav.northwind9-Jul-04 22:34
mav.northwind9-Jul-04 22:34 
GeneralAccepting date values Pin
Richard Jones9-Jul-04 2:33
Richard Jones9-Jul-04 2:33 
GeneralRe: Accepting date values Pin
Richard Jones12-Jul-04 7:18
Richard Jones12-Jul-04 7:18 
Generalraising an event Pin
Member 11412669-Jul-04 2:14
Member 11412669-Jul-04 2:14 
GeneralRe: raising an event Pin
mav.northwind9-Jul-04 22:26
mav.northwind9-Jul-04 22:26 
GeneralRe: raising an event Pin
Member 114126612-Jul-04 0:24
Member 114126612-Jul-04 0:24 
GeneralRe: raising an event Pin
mav.northwind12-Jul-04 2:00
mav.northwind12-Jul-04 2:00 
GeneralNew .NET Pin
Brendan Vogt8-Jul-04 23:26
Brendan Vogt8-Jul-04 23:26 
GeneralRe: New .NET Pin
Roman Rodov15-Jul-04 15:22
Roman Rodov15-Jul-04 15:22 
GeneralFrame Windows Pin
smack_2k27-Jul-04 10:10
smack_2k27-Jul-04 10:10 
GeneralSystemparametersinfo (Wallpaper) Pin
MeConfused7-Jul-04 7:22
MeConfused7-Jul-04 7:22 
General# of projects in Start Page Pin
Richard Jones7-Jul-04 2:14
Richard Jones7-Jul-04 2:14 
GeneralRe: # of projects in Start Page Pin
Colin Angus Mackay7-Jul-04 2:24
Colin Angus Mackay7-Jul-04 2:24 
GeneralRe: # of projects in Start Page Pin
Richard Jones8-Jul-04 1:55
Richard Jones8-Jul-04 1:55 

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.