And the text written out to the console is BC, obviously, or perhaps not so obviously to me as I had spend a bit of time debugging (a much larger) program containing equally trivial C#.
using System; using System.Text; namespace ConsoleApp1691 { class Program { static void Main(string[] args) { StringBuilder sb = new StringBuilder('A'); sb.Append('B'); sb.Append('C'); Console.WriteLine(sb.ToString()); } } }
This is my shortest blog post yet – more like a long tweet.
— Published by Mike, 20:21:24 17 May 2018 (BST)
By Month: November 2022, October 2022, August 2022, February 2021, January 2021, December 2020, November 2020, March 2019, September 2018, June 2018, May 2018, April 2018
Apple, C#, Databases, Faircom, General IT Rant, German, Informatics, LINQ, MongoDB, Oracle, Perl, PostgreSQL, SQL, SQL Server, Unit Testing, XML/XSLT
Leave a Reply