Getting your Machines IP Address

I was working on some code recently where I needed to get the IP Address of the current machine that the code was executing on. I settled on this snippet below. I thought I would share it.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;

namespace Utility
    public sealed class MachineIPAddress
        private MachineIPAddress() { }

        public static string RetrieveIPAddress
                var hostEntry = Dns.GetHostEntry(Dns.GetHostName());
                var ip = (from addr in hostEntry.AddressList
                          where String.Compare(addr.AddressFamily.ToString(), "InterNetwork", StringComparison.OrdinalIgnoreCase) == 0
                          select addr.ToString()

                return ip;
Participate with Coding in the Trenches on Facebook
Participate with Coding in the Trenches on Facebook by Click the button above.

Training : Twitter Bootstrap

In this article I have collated a few training links about Twitter Bootstrap. I will keep adding to this page as I find other useful free resources. If you have any videos or articles that you feel would be useful here then please let me know in the comments and I will add them to the post. I would like it to be an archive of good material.

Twitter Bootstrap CSS Layout Framework
Twitter Bootstrap CSS Layout Framework

Bootstrap Tutorial Sites

Download Bootstrap

Bootstrap Tutorial at W3Resource

How to use Twitter Bootstrap to Create a Responsive Website Design

Mobile First with Bootstrap 3

Twitter Bootstrap Tutorials

PC Pro Twitter Bootstrap Tutorial

Bootstrap Videos

Bootstrap 3 Tutorials at Coders Guide (10 Parts)

Bootstrap 3 Extra Tutorials at Coders Guide (2 Parts)

Responsive Web Design with Bootstrap at Coders Guide (8 Parts)

HTML5 Bootstrap Responsive Web Layout

Bootstrap 3 Introduction & Grids

Learn Bootstrap Series with Jonathan Sampson

Happy New Year!!

We are now at that time of year where everyone is making New Year’s resolutions about how they want to better themselves by losing weight, getting fitter etc. It is also important to think about what you want to do with your career and there is no better time to think about this than New Year.

Happy New Year from {Coding in the Trenches}
Happy New Year from {Coding in the Trenches}

New Year is a good opportunity to take a good hard look at what you do for a living and think, is this what I want to be doing? Does this job still have the same level of opportunity that it initially did when I first took it? If the answer is yes, then great, but if the answer is no, maybe now is the time to look for a new opportunity, as getting a new opportunity elsewhere for yourself even opens up opportunity for someone who is taking over your job.

I don’t mean for this to sound negative about whether you are happy in your current job, but maybe New Year is a good time to evaluate things.

%d bloggers like this: