I think the synchronized execution of methods is exposed MethodImplAttribute( MethodImplOptions.Synchroniized)
I sometimes regret that c# does not allow anonymous types to implement interfaces.
How would you implement an interface with anonymous types? Only way I could see is like the dynamic keyword, similar to how Typescript may “implement” an interface.
This is similar to what I envisioned, but the multiple interfaces example is so ugly. I do not know how I feel about this feature right now.
```
var client = new
{
Name = "Khalid",
....
} : IClient, ICustomer;
```
Seems more consistent imo.
> is so ugly
Exactly the issue with many of the "other ways" of doing 1 thing.
If you need an interface on your anonymous type - do you really need it to be anonymous?
Do we need 7 different ways of doing constructors?
Look at C++. Its okay to say no.
The tidbit about mscorlib was interesting. I had been assuming it was short for "Microsoft Core Library" squished down so it could fit in an 8.3 filename.
10 Comments
tomw255@reddit
supermitsuba@reddit
modernkennnern@reddit
modernkennnern@reddit
tomw255@reddit
FullPoet@reddit
modernkennnern@reddit
GameFreak4321@reddit
binarycreations@reddit
ASCS6@reddit