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
gggsggsgg
Full text search using Linqdb
NumberToWords C# Structural
asdfgthyjukjyhtgrfed
Testing 001
enums with extension method: better
program
Invalid cast
Coinbase Customer Support Number +1(201-277-8882) Helpline Toll Free Number USA
масиви част1