Call.ToString C# (CSharp) Method

ToString() public method

public ToString ( ) : string
return string
    public override string ToString()
    {
        StringBuilder builder = new StringBuilder();
        builder.Append("Call Info: ");
        builder.Append(string.Format("Number: {0} ", this.DialedNumber));
        builder.Append(string.Format("Date: {0} ", this.Date));
        builder.Append(string.Format("Time: {0} ", this.Time));
        builder.Append(string.Format("Duration: {0} seconds", this.Duration));
        return builder.ToString();
    }
}

Usage Example

Example #1
0
        public HtCall(string rootpath, Call call)
        {
            RelativePath   = BackOne;
            Title          = call.ReadableName + " call";
            IncludeJQuery  = false;
            ActiveMenuItem = MenuItem.Calls;

            var potentialIconName = call.Name.ToLower();

            if (potentialIconName.Contains("-"))
            {
                potentialIconName = potentialIconName.Substring(0, potentialIconName.LastIndexOf('-'));
            }
            if (File.Exists(Path.Combine(rootpath, $"stuff\\{potentialIconName}.png")))
            {
                LeftTopIcon = potentialIconName;
            }
            else
            {
                Logger.Log($"Icon '{potentialIconName}' not found");
            }

            if (!TryIfLinkIsAlive(rootpath, call.Name + ".html"))
            {
                if (!TryIfLinkIsAlive(rootpath, call.Name.Split('-')[0] + ".html"))
                {
                    Logger.Log($"No good link found for '{call.Name}' from the call");
                }
            }

            EditPath = $"calls/{call.Name}.cfp";
            Content  = $"<h2><span class=\"ttl\">Call</span> of {call.ReadableName}</h2>"
                       + Environment.NewLine
                       + call.ToString();
        }
All Usage Examples Of Call::ToString