Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Parsing a multi-line text file with comments
//Title of this code //Rextester.Program.Main is the entry point for your code. Don't change it. using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { //Your code goes here string test = "//comments\n1:0\n1:1\n2:1\n"; Console.WriteLine("Hello, world!"); List<string> testSplit = new List<string>(test.Split('\n')); for (int x = 0; x < testSplit.Count; x++) { Console.Write(testSplit[x]); if (testSplit[x].StartsWith("//")) { Console.Write("\t<-- this is a comment!"); } Console.WriteLine(""); } } } }
run
|
edit
|
history
|
help
0
singly linked list traversal
Test
Gerador de Matriz Data
sdfnmj,k, mnfdc
exception implicit toString
Operator Overloading + Operator
train555555
Zadanka
4
SMS recipient filter testing