c#


Get by Reflection Properties from a Class


Lets assume that we have the following TestClass
public interface IBase
{
int MyIntegerAA { get; set; }
}
public interface F : G
{
string MyStringBB { get; set; }
}
public interface E : F
{
string MyStringCC { get; set; }
IBase xyz { get; set; }
}
public interface D : E
{
int myint1 { get; }
int myint2 { get; }
int myint3 { get; }
int myint4 { get; }
}
public interface C : D
{
string MyString1{ get; set; }
}
public class B : C
{
public int myint1 { get; }
public int myint2 { get; }
public int myint3 { get; }
public int myint4 { get; }
public string MyString1 { get; set; }
public IBase xyz { get; set; }
}
public class A : B
{
public string test1 { get; set; }
}
The question is, how we can "enumerate" each class and interface, to get back only its declared properties, without the reference on the Interface IBase during the enumeration.
For Example
If i try to get the Properties of Class B, then i get back the following
Current Father Is : GetProperties.Form1+TestClass+B
The number of public properties : 6
Property name: xyz
Property type: [GetProperties.Form1+TestClass+IBase]
Property name: myint1
Property type: [System.Int32]
Property name: myint2
Property type: [System.Int32]
Property name: myint3
Property type: [System.Int32]
Property name: myint4
Property type: [System.Int32]
Property name: MyString1
Property type: [System.String]
Is there any way, NOT to include the
Property name: xyz
Property type: [GetProperties.Form1+TestClass+IBase]
??

Related Links

Can parameters be contra- or covariant in Python?
How to match two Lists in some condition in C# [closed]
Can't get cookie with HttpClient and windows phone 8
Instantiate overload not sure why
To check if print command was sent to the printer in wpf
Pointing an exe to a dll outside of the executable's directory
How to scrape contact data from many websites? [closed]
C# Where to initialize IDisposable resource - within data class or data-object-list holders class
public static IEnumerable<int> Method [closed]
Pop-up window while creating a webpage
ASP.Net MVC custom datatype passing additional values
Callback never gets executed in Unity Web Player
Cannot Find File that does exist in IsolatedStorage (WP8)
Getting last autonumber in access
Using the Math.Pow function [duplicate]
Why do Windows Azure not load balance while Thread.Sleep()?

Categories

HOME
reactjs
autohotkey
internet-explorer
kendo-ui-angular2
netty
system-calls
sql-server-2014
jenkins-pipeline
highmaps
hiveql
datetimepicker
snmp
confluence-rest-api
checkpoint
rename
aspectj
osclass
mongodb-replica-set
fine-uploader
browsermob
openstack-horizon
dompdf
cucumberjs
gpo
caldav
react-jsx
sonarlint
keystone
concatenation
jira-zephyr
knapsack-problem
pydub
android-cursorloader
meteor-accounts
andengine
urhosharp
postgresql-9.6
oracle-nosql
tunnel
ansible-inventory
hippocms
redhat-brms
byobu
pyexcel
jquery-ui-slider
peerjs
servicebus
ocpjp
spring-data-commons
r-commander
overhead
cardview
fileopendialog
directinput
ownership
glade
dimensionality-reduction
ldd
settext
xcode7.1
instaparse
sprockets
avaudiorecorder
sqlxml
dynamics-nav
overlapping
uinavigationitem
jsoncpp
textblob
teamwork
stderr
jeet-grid
jad
iphone-6
aiff
xpand
dateadd
android-relativelayout
image-preloader
fade
outlook-object-model
coinbase-php
magicsuggest
microsoft-speech-platform
quit
xcode4.6.3
states
diazo
datasheet
code-organization
xhtmlrenderer
rollover
conditional-operator
xslt-grouping
code-golf
rpxnow
paperless

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App