Tuesday, January 31, 2012

Bitwise Logic in C#, and HasFlag

Hey, if you're ever using bitwise logic, or you want to know how to use bitwise logic, check out this post:

Bitwise Logic

One of the cool new features is the HasFlag() method in .NET 4.0 that lets you quickly verify if a bit has been flagged or not. The HasFlag is at the bottom of the page. I wish I could write more about this, but NO TIME!! Maybe I'll expand on it later. Ciao!

Line Numbers in Visual Studio

Here's a simple little feature that I never realized I could do. Did you know that you can actually view LINE NUMBERS in Visual Studio? YES! I'm sure all 1 of you who are reading this are like, "DUH!!", but I didn't know how to do it. If you want to see how, read this here:

How to Display Line Numbers in Editor

Oh, and you're welcome, DUH!!

Wednesday, January 18, 2012

Change Browser Plug-in

I posted something a while ago about how to change browsers in Visual Studio, but it can be problematic when using the MVC framework, because VS won't let you browse templates or Views directly in a browser like you can with Web Forms - which lead me on a short search down the interwebs where I found this solution!

For Visual Studio 2010, there's a downloadable plug-in available that will let you change your browser on the fly. Check out:

http://visualstudiogallery.msdn.microsoft.com/bb424812-f742-41ef-974a-cdac607df921

I'm using it now and it's awesome. It puts a little toolbar at the top of the IDE with icons for all the browsers you have installed on your PC so you can switch between them. Browsers available are ie, firefox, chrome, safari, and opera. This makes switching browsers even EASIER, and I've found it to be pretty nifty.

Oh, and according to Microsoft, a similar toolbar will come built in with Visual Studio 2011. Purty cool!

Saturday, January 14, 2012

Creating Custom Exception Types in .NET

There's going to come a time when you need to create a custom Exception type. Of course, there are always people who will go overboard and use a custom exception type instead of actually coding a check to prevent the exception, which is very bad, but that's now what this post is about. What it IS about is how to do it.. so I'll post a link to some guy who wrote it all out for me already.

http://blog.gurock.com/articles/creating-custom-exceptions-in-dotnet/

Me = SOooooo lazy.