Skip to content

Instantly share code, notes, and snippets.

View ZaneDubya's full-sized avatar
🏝️

Zane Wagner ZaneDubya

🏝️
View GitHub Profile
using System;
using System.Diagnostics;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace MacTranslocator {
class TranslocateHandler {
/// <summary>
/// This is the name of the game, the name of the folder in local storage where the game will be run from,
@ZaneDubya
ZaneDubya / CsvReader.cs
Created July 24, 2017 18:31
A generic reader for files containing comma separated values.
using System;
using System.IO;
namespace UMNCommonData.IO {
public class CsvReader {
public static CsvReader Open(string path, int fieldsRow, int firstDataRow, char separator) {
string[] lines = File.ReadAllLines(path);
string[] fields = lines[fieldsRow].Split(separator);
return new CsvReader(lines, fieldsRow, firstDataRow, separator);
}