Software development tutorials and demos lasting no more than 60 seconds.
No in-depth explanations, no off-topic rants, and no slides. One small topic per video - only code, console, config, and client.
All videos come with a corresponding blog entry, and all code is available on GitHub.
Modify web.config appsettings value
var config = WebConfigurationManager.OpenWebConfiguration("~");var section =(AppSettingsSection)config.GetSection("appSettings");
Don't be afraid of using the .NET CLI and skipping Visual Studio. Visual Studio Code is a fantastic IDE for .NET projects - obviously not as powerful as Visual Studio, but it's significantly lighter and faster, and the integrated terminal is desperately needed in Visual Studio. The .NET CLI is actually incredibly easy to work with. This video shows some of the basic commands. See the documentation for more. View code on GitHub
The switch statement in C# has been there since the beginning. Originally it was for a simple data type only, and you could only go through cases of constant values. Now there's so much more. View code on GitHub
SQL Server lets you execute dynamic SQL with the EXEC command. However, if you're accepting any user input as part of the query, you'll be subject to SQL injection attacks. The system proc sp_executesql gives you the ability to build a parameterized statement dynamically, and execute it, passing in the parameter values. As long as you're building the query safely, you won't be subject to SQL injection. View code on GitHub