So, I was modifying one of my codes and ended up writing something like this,
class TestClass
{
static void Main(string[] args)
{
var lstObj = new List<List<string>>()
{
new List<string>() { "ABC","DEF", },
new List<string>() {"GHI","JKL" },
};
}
}
Notice the extra comma (",") in following lines,
new List() { "ABC","DEF", }, //After "DEF"
new List() {"GHI","JKL" }, //After '}'
After realizing the typo, I decided to cancel the Build, correct it and restart the Build. But I was little too late, and to my surprise the Build already got completed successfully.
I am just wondering if this is proper syntax or if this has any special meaning to it.
Tried looking up for documentation supporting this but couldn't find any. Tried looking up the C# Language Specification and it is beyond me to comprehend anything related to this.