Click here to Skip to main content
15,886,873 members

Comments by L Viljoen (Top 29 by date)

L Viljoen 14-Dec-15 8:27am View    
Reason for my vote of 1 \n Bad practice, use properties
L Viljoen 23-Jan-13 2:38am View    
yes but that wont prevent the device from being unplugged and used in a diferent pc.

Basically what it boild down to is we want only our software to be capable of using the device, I am checking with securitech if they may not have a solution for us.
L Viljoen 22-Jan-13 9:30am View    
My Device is a digital persona, Good solution but i am afriad it wont suit my needs I need a more out of the box solution becuase I need to roll this out to thousands of devices.
L Viljoen 2-Jan-13 0:14am View    
I looked at the error, can you please show me the format of your text file becuase something tells me its not comma dlimited or place a line

if(line.Length > 3){
string[] dataBreakdown = System.Text.RegularExpressions.Regex.Split(line,","); //seperating the comma delimited data Console.WriteLine("ID:"+dataBreakdown[0]+" Full Name: "+dataBreakdown[1] +" Tel: "+dataBreakdown[2];
}
after the foreach string
L Viljoen 31-Dec-12 7:58am View    
Ok lets say in your text file you have the following file in "c:\myfile.txt":
1, John Smith,054 654 1234
2, Jane Smith,054 654 1235
3, Andrew Smith, 054 654 1236

This is comma delimited data in the form: id, fullname, phone number

now you wish to break it down so in C# you go
string filename = @"C:\myfile.txt";
string[] fileLines = System.IO.File.ReadAllLines(filename);
foreach(string line in fileLines){
string[] dataBreakdown = System.Text.RegularExpressions.Regex.Split(line,","); //seperating the comma delimited data
Console.WriteLine("ID:"+dataBreakdown[0]+" Full Name: "+dataBreakdown[1] +" Tel: "+dataBreakdown[2];
}