Not sure if they are called operations but here is the deal. I wrote some code.. it works perfectly - now some of the code I hijacks from coding forums. here is the code..
this line hereCode:string[] files = Directory.GetFiles(GameRef.GetDocumentsDirectory + @"\My Documents\My Games\RPGBXL"); string dir = GameRef.GetDocumentsDirectory + @"\My Documents\My Games\RPGBXL"; foreach (string file in files) { FileInfo f = new FileInfo(file); if (f.Extension == ".xml") { //parses out that huge Directory address! string filename = Regex.Match(file, @"[^\\]*$").Value; FilesToLoad.Add(filename); } }
I don't know how it works... it works perfectly! And I know it parsing that huge directory string to make it smaller but what do these things mean?:Code:string filename = Regex.Match(file, @"[^\\]*$").Value;
^ , \\ , *$ - I have no idea what those are doing




Reply With Quote