Programming (back-end)

.NET types can have spaces. And not only spaces.

No, you cannot write code like that:


At the same time there is no new C# 9.0 nor C# One that allow to write such code. But there is a namespace called System.Reflection.Emit containing TypeBuilder that can generate valid CLR types. Here’s a sample code that you can use, to put some more life into your Employee entity:

I don’t suggest to start writing code like that, but have it in mind while playing with reflection on some external libraries (I guess there would be a problem when serializing such object to XML).


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s