Jiry_XD
Explore posts from serversHow to prevent nulls using this approach for Object Initializers?
In C# I have this class:
As you can see I have two constructors, when using object initializers I need to use one of them. I like using object initializers using no constructor aka the default constructor but because I added it there is no default so I added it.
But now the problem is that people can call
new EmailAddress()
without passing an email and it can stay null that way?
How can I still be able to have an empty constructor so I can use object initializers without having the risk somoene calls new EmailAdress();
?13 replies
✅ What's new in .NET 8 regarding making a WASM project?
Hello guys,
I am looking into learning Blazor WASM.
I was viewing some tutorials online on how to setup the project but everything seems to have changed since .NET 8.
Normally you could make a Blazor WASM project + ASP .NET Core hosted, now you have to do it manually?
Or is there still an option to do it automatically?
Why did they remove it, is it not the standard anymore? If so what is the new standard?
46 replies