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

asp.net app on IIS can't connect to localdb
clearing memory after arrays are used in unity
C# Using Primary Key to Find a Row Within a DataTable (That is Contained in a Different Class)
How does LambdaExpression resolve to Expression<Func<T, returnT>> at runtime via dynamic?
Returning List from another function count is right, but contents are null Unity3d
ms access DB with pdf hyperlinks in a asp.net web page
i got this error when i deploy my App : You must supply a layout_width attribute
Exception in Common.Logging.dll: Failed obtaining configuration for Common.Logging from configuration section 'common/logging'
Entity Framework Multiple DbContexts With Multiple MySql Schemas
VB.NET How to output From 'A' to 'ZZZ'
How to Convert JSON Object Array String to JSON Object Array to Custom Class in Xamarin
Want to use service account to connect to AD under which my app is running
How should I localize static ComboBox items?
set display name to lowercase in data annotation
c# serialization xmlwriter stringwriter out of memory for large objecthelp
Easy Delegate ve Event issue [duplicate]

Categories

HOME
youtube-api
msbuild
leaflet
typo3
ssh
compression
service
cdn
openbsd
element
sha1
web-worker
nsoperation
hl7-fhir
descriptor
pumping-lemma
formtastic
hierarchical-data
uibarbuttonitem
edsdk
textview
jmsserializerbundle
language-detection
luhn
rtos
android-scrollview
bootcamp
android-geofence
ragel
campaign-monitor
perf
android-databinding
anypoint-studio
form-fields
latency
idea-plugin
ui-grid
jquery-ui-slider
firefox-developer-edition
ack
npoco
spring-cloud-bus
lucee
standard-error
sharpdevelop
activesupport
rmq
copy-constructor
directinput
blackberry-webworks
firebase-polymer
consolidation
alfred
transaction-isolation
mod
custom-build-step
ideavim
apache2-module
sqldataadapter
javapackager
self-join
properties-file
web-standards
vspackage
backtrace
optimistic-locking
qxorm
disparity-mapping
dotcmis
atg-dynamo
debuggervisualizer
ant-contrib
mobile-robots
kendo-window
infomaker
android-library
dd4t
microsoft-speech-platform
setcookie
gssapi
waveout
django-1.4
diazo
commonsware
scriptmanager
isgl3d
file-processing
netduino
n2
excellibrary
http-response-codes
browser-state
linq-to-mysql
mysql-pconnect
appointment
file-storage
retrospectiva

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