Cleanup c# code to read in a very simple data file
$10-30 USD
Paid on delivery
I have some c# code I am looking to have cleaned up / simplified. All this code needs to do is read some values into a a simple data structure. Looking for best practice on naming conventions etc. Data file attached.
public struct defbulk
{
public string Description;
public float Density;
public float Repose;
public float Abrasive;
public static defbulk CreateInstance()
{
defbulk result = new defbulk();
[login to view URL] = [login to view URL];
return result;
}
}
internal static void LoadMaterial()
{
int i = 0, count = 0;
string a = "";
try
{
[login to view URL](1, [login to view URL]([login to view URL]) + "\\[login to view URL]", [login to view URL], [login to view URL], [login to view URL], -1);
[login to view URL](1, ref count);
bulk = new defbulk[count];
[login to view URL] = new string[count];
for (i = 0; i < count; i++)
{
[login to view URL](1, ref bulk[i].Description);
[login to view URL](1, ref a);
bulk[i].Density = (float) [login to view URL](a);
[login to view URL](1, ref a);
bulk[i].Repose = (float) [login to view URL](a);
}
[login to view URL](1);
}
catch
{
string msg = "";
msg = [login to view URL]([login to view URL]) + "\\[login to view URL]" + " could not be found or is corrupt. This must be corrected for the program to load. Please contact HT for assistance.";
[login to view URL](msg, [login to view URL]);
[login to view URL](0);
}
}
Project ID: #11891088
About the project
Awarded to:
I have over than five years experience with code engineering and development support, specially working with file management. If you allow me, I can deliver exactly what you expect.
12 freelancers are bidding on average $24 for this job
Sr. Software Developer having 7 years experience. Sr. Software Developer having 7 years experience. Sr. Software Developer having 7 years experience. Sr. Software Developer having 7 years experience.
Hi, I'm a C# developer you can see some of my work no my profile. I can do this job right now. If you select me I'll write you a very clean and commented code. Let's start if you wish :)