Convert C# code snippet to Swift 4 OSX not iOS

Open and read in a text file (URL)

Function to read in and return two lines. Instead of returning an array of 2 strings can return a dictionary with key and value.

Should be written in Swift 4 for OSX

StreamReader sr;



sr = new StreamReader(igesFile);

// Get the first code/value pair

string [] codes;

codes = ReadCodes(sr);

// Loop through the whole file until the "EOF" line

while (codes[1] != "EOF")




// ReadCodes reads two lines from an open file and returns a two item

// array, a group code and its value. As long as a DXF file is read

// two lines at a time, all should be fine. However, to make your

// code more reliable, you should add some additional error and

// sanity checking.


static string [] ReadCodes( StreamReader sr)


string codeStr, valStr;

codeStr = [url removed, login to view]();

valStr = [url removed, login to view]();

// Trim the leading and trailing space from the code

string [] rcodes = new string[2];

rcodes[0] = [url removed, login to view]();

rcodes[1] = valStr;

return rcodes;


Skills: Swift

See more: latest version of swift programming language, swift versions, latest swift car version, swift version history, how to update swift version in xcode, swift latest version ios, swift version check, xcode 8 swift version, objective c, iPhone, iPad, Swift, iOS, Convert Several Excel Formulas to C# Code -- 2, convert java code to c code online, convert java code to c, convert c++ code to java online free, convert android code ios, convert php code ios

About the Employer:
( 131 reviews ) Bonita Springs, United States

Project ID: #15179845

Awarded to:


Dear sir. I'm very interested in your project because I have extensive experience in swift and C#. I can finish your project with high quality and clean code. Thank you Relevant Skills and Experience c#, swift Propos More

$25 USD in 1 day
(1 Review)

3 freelancers are bidding on average $192 for this job

$500 USD in 1 day
(5 Reviews)

Hi, I can convert C# code snippet to Swift 4 OSX not iOS. Please send me message so we can discuss in detail. Relevant Skills and Experience iOS, Swift, Objective C, Xcode, C# Proposed Milestones $50 USD - milestone More

$50 USD in 1 day
(1 Review)