Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
AX 2012 Test #1
//Title of this code //Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { String value = "GR-31-0001-023850,GR-31-0001-023851,"; // from <Table_SalesInvoiceTmp>.<Field_BSRPackingSlipIds> int NroLinRef = 3; String TpoDocRef; String SerieRef; String NumeroRef; Char delimiter1 = ','; Char delimiter2 = '-'; String[] substrings = value.Split(delimiter1); foreach (var substring in substrings) { if (substring.Split(delimiter2).Length > 1) { TpoDocRef = substring.Split(delimiter2)[1]; SerieRef = substring.Split(delimiter2)[2]; NumeroRef = substring.Split(delimiter2)[3]; Console.WriteLine(NroLinRef); Console.WriteLine(TpoDocRef); Console.WriteLine(SerieRef); Console.WriteLine(NumeroRef); NroLinRef++; } } } } }
run
|
edit
|
history
|
help
0
Příklad
asdxscddasdcf
asxasx sxa
Celsius to Kelvin / Kelvin to Celsius
z x xc x
1
property and synthesize
Pot
BST final
sdgsdhsdhs