Created
February 8, 2018 21:50
-
-
Save ryanwebjackson/235b48d042c47c45d6a30973634728b1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I realize this *sounds* like a bad idea, but hear me out. I have a few different imported web services (.NET classes generated from a web service response definition), and classes from different services implicitly have the same interface - they have properties named that same, which represent the same things, but are only different types due to code generation. Is there a way to create an explicit interface to represent this relationship? I tried make a standard, typed C# interface, and it's not easy, due to custom classes several levels deep. | |
I realize I could use reflection, or serialize to JSON, but am wondering if there's a way I could use dynamic types, or something else, to say | |
"I want these (named) properties, but don't care what type they are". |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment