© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
16 replies
scac

✅ Get property from generic type?

I have a method with a generic type. Two objects of different classes may be passed to it. How do I access a property in these objects (it has the same name in both objs)? Been trying with reflection but I'm getting a
Object reference not set to an instance of an object. C# GetProperty()
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

❔ Get property from type
C#CC# / help
3y ago
Get concrete generic type by Enum
C#CC# / help
12mo ago
Retrive TypeDeclarationSyntax from a referenced type
C#CC# / help
4y ago
✅ Generic nullable type
C#CC# / help
3y ago