PurplePen.CourseObj.ToString C# (CSharp) Method

ToString() public method

public ToString ( ) : string
return string
        public override string ToString()
        {
            string result = "";

            string typeName = GetType().Name;
            if (typeName.EndsWith("CourseObj", StringComparison.InvariantCulture))
                result += string.Format("{0,-16}", GetType().Name.Substring(0, typeName.Length - "CourseObj".Length) + ":");

            if (layer != 0)
                result += string.Format("layer:{0}  ", (int)layer);
            if (controlId.IsNotNone)
                result += string.Format("control:{0}  ", controlId);
            if (courseControlId.IsNotNone)
                result += string.Format("course-control:{0}  ", courseControlId);
            if (specialId.IsNotNone)
                result += string.Format("special:{0}  ", specialId);
            result += string.Format("scale:{0}  ", scaleRatio);

            return result;
        }