Category Archives for C#

C# Volatile Keyword

Of the many keywords in C#, volatile is one of the lesser known and last commonly used keywords. Today, I will in 5 minutes of less, explain what the volatile keyword is for and when the volatile keyword should be … Continue reading

18. January 2015 by Adam Riddick
Categories: C#, Tips | Leave a comment

C# Using Debug.Assert

Debug.Assert is a member of the System.Diagnostics library that can be used to validate a condition, pausing the running of an application is the condition is not satisfied. Quoting from Code Complete (I highly suggest giving it a read if … Continue reading

21. November 2014 by Adam Riddick
Categories: C#, Tips | Leave a comment

Editable User Friendly URL Structure in MVC

User Friendly URL’s There is a logic behind user friendly URL structures on a website. No matter what you call them, Clean, User Friendly, SEO Friendly, or Semantic URL’s, the purpose behind them is to improve a website experience by ensuring the … Continue reading

02. October 2014 by Adam Riddick
Categories: ASP.Net, C# | Leave a comment

C# Inherit from multiple interfaces with clashing method names

Recently, in one of those many projects on the go, I was working on an interface between two individual systems that are required to talk to each other. I can’t discuss much about the project itself, white label and all, … Continue reading

18. September 2014 by Adam Riddick
Categories: C#, Tips | Leave a comment

C# Dynamically Load Types From DLL

Reflection is a great way to allow us to Dynamically Load Types From External DLL’s. I love reflection. I learned about Reflection when I started creating FakeModel, and haven’t looked back since. I use Reflection in many projects for lots … Continue reading

11. September 2014 by Adam Riddick
Categories: C# | Leave a comment

Isolating Unit Tests with Microsoft Fakes

Isolating unit tests is a large requirement of unit testing. Quite often, individual units of code will rely on, or access,  other sections to do their processing. For example, a method that saves an entity to the database will call … Continue reading

23. August 2014 by Adam Riddick
Categories: C#, Testing, Tips | Leave a comment

ASP.Net Per-Request Pattern

When Developing, the objects we create can have different Lifecycles. For example, an object can maintain a Singleton lifecycle, in which only one version of the object can ever exist. Today, I will demonstrate how to implement a Per-Request Lifecycle. … Continue reading

07. August 2014 by Adam Riddick
Categories: ASP.Net, C#, Design & Practice | Leave a comment

Insight: AuthorizeAttribute Lifecycle

I’ve learned a valuable lesson about the AuthorizeAttribute Lifecycle recently, one which I feel should be shared with the world. Hopefully, someone will gain something from this, hopefully I can fix the issue I faced for others. The Story The … Continue reading

22. July 2014 by Adam Riddick
Categories: ASP.Net, C# | Leave a comment

MVC External Controllers

In my current role I am architecting and implementing an application platform that is flexible and dynamic enough to allow a full set of application features be loaded into the application without any outward dependencies from the central application block. This … Continue reading

26. June 2014 by Adam Riddick
Categories: Achitecture, C# | Leave a comment

C# ?? Operator

Those of you who have used C# for a while will probably be familiar with the ?? operator, known as the null coalescing operator. The ?? Operator is used to check if a value is null, and will return the … Continue reading

16. June 2014 by Adam Riddick
Categories: C#, Tips | Leave a comment

← Older posts