Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
C# Enumerate properties of a class/type
SUBMITTED BY:
Guest
DATE:
Nov. 21, 2013, 5:35 a.m.
FORMAT:
C#
SIZE:
158 Bytes
Raw
Download
Tweet
HITS:
816
Go to comments
Report
Type
t
=
p
.
GetType
();
foreach
(
PropertyInfo
info
in
t
.
GetProperties
()){
if
(
info
.
Name
==
propName
&&
info
.
CanWrite
){
info
.
SetValue
(
p
,
value
,
null
);}}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus