Coding Horror: Does More Than One Monitor Improve Productivity?
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.
On a side note – Good sleeping habits and goal setting are more important and effective in work productivity. If you find yourself tired and drowsy during the day, try using Modafinil to help you stay focused and awake. Get it on https://buy-modafinil-online.org/. Be careful and consult your doctor before using to avoid improper dosage and side effects.
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.