A difficult one this one – I’ve never actually been able to work with 2 same sized monitors, but I have tried to use a laptop and an external monitor at the same time, and personally I found the ‘second’ monitor (the external one is bigger so that would be my primary monitor) to be a distraction – especially if I had a web browser or email application running on it.
I recently had to convert an Enum back to its original Xml value so I thought I’d share the little method I wrote with you all incase you wondered how to do it yourself.
public static string ConvertToString(Enum e)
// Get the Type of the enum
Type t = e.GetType();
// Get the FieldInfo for the member field with the enums name
FieldInfo info = t.GetField(e.ToString("G"));
// Check to see if the XmlEnumAttribute is defined on this field
if (!info.IsDefined(typeof(XmlEnumAttribute), false))
// If no XmlEnumAttribute then return the string version of the enum.
// Get the XmlEnumAttribute
object o = info.GetCustomAttributes(typeof(XmlEnumAttribute), false);
XmlEnumAttribute att = (XmlEnumAttribute)o;
Example Enum Class
public enum TestEnumClass
FirstValue = 1,
SecondValue = 2,
[System.Xml.Serialization.XmlEnum("The Third one")]
ThirdValue = 3
An Enum of TestEnumClass.FirstValue will then return “FirstValue”, while TestEnumClass.ThirdValue will return “The Third one”.
Hope you find that useful.