We've seen some pretty pointless constants defined before. And again. So it shouldn't come as a huge shock to see Colin's colleague define a line break constant instead of using "\r\n". Or using Environment.NewLine. Or using a property to define the constant instead of ... oh ... say ... a constant. Or taking six lines to return a simple, two-character string. But naming it CRLF? 'Sup with that?!?
using System; namespace Initech.Global.Reference.Common { //namespace changed to protect the guilty /// <remarks> /// Class for containing constants needed in multiple locations /// </remarks> public class Constants { public Constants() { } /// <summary> /// CRLF - creates a string representing a carriage return line feed /// </summary> public static string CRLF { get { char chrCR = (char)13; string strCR = chrCR.ToString(); char chrLF = (char)10; string strLF = chrLF.ToString(); string strCRLF = strCR + strLF; return strCRLF; } } } }
[Advertisement]
BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!