Blog posts

87 results found

87 results in .NET, Conferences, Tools

dotnet Please tell me you don't write if true equals true

It drives me crazy when I see code where someone is checking a boolean to see if it is true or not and they write it like this.

dotnet MVC Custom Model Property Validation Attributes

This post shows you how to create your own custom validation attributes in MVC. You can then decorate your model properties with them on your forms.

tools Free productivity tool - Workflowy

If, like me, you like to write lists to help you focus on what’s required to complete a certain job, and sometimes break the bullet points into mini lists themselves, then this online tool should help you. Workflowy allows you to do just that, it’s free, really easy to use, and it is available on web, iOS and Android.

tools Test your programming skills with Project Euler

If you enjoy writing code and solving puzzles, you will love Project Euler. It is filled with mathematical puzzles which require you to write some code to get the answer. You could use the problems as a chance to write out the solution in a different programming language.

dotnet SHA 256 and SHA 512 hash examples

This post contains examples of how to generate a SHA 256 and SHA 512 hash key with the examples in C# and VB.NET This solution matches the expected result for Ingenico's implementation for their payment gateway.

tools·dotnet LINQPad

I recently came across this fantastic resource. It is called LINQPad. You can use it to test any C#, F# or VB snippet or program. You can even use it to query databases in LINQ or SQL. It's ideal if you find some code on the internet that you want to quickly test, or if you want to play with the new features in C# 6 without having to set up a windows console/forms app or website.

dotnet MVC client side form validation

This post shows you how you can do client side, unobtrusive validation on your MVC form. It assumes you have already set up your Model, View and Controller, but you just need to know how to get it to validate on the client side.

dotnet Helper methods for retrieving web config app settings

This post gives you some examples of how you can check for errors when retrieving web.config app setting values.

tools lorempixel Placholder Images

This gives you real placeholder images to use in your site concepts or examples. It randomly picks an image each time the page loads.

dotnet Get a flat list of exception and inner exception error messages

Debugging errors can be difficult, especially when you need to see the errors inside the errors. This post shows you how you can get all errors as a collection of errors rather than them being hidden inside other errors. You can create an extension method like this one

tools Dynamic placeholder images

I found this and thought it would be really useful, especially for designers or people mocking up sites. If you ever need a placeholder image, you don’t need to create one, you can just use this url with the size of placeholder image you want:

dotnet Sorting a list into random order using linq

Every now and again, there is a need to produce a list in a random order. I've found a very reliable way to do this using linq and the Guid class. It might sound complicated, but when you see the example, it should make sense and you should see how simple it is.