Okay, I am working on converting some objective c code to c# here is what I have.
NSTimeInterval now = [[NSDate date] timeIntervalSince1970];
NSData * formattedstring= [[NSString stringWithFormat:@"%@%.0f%@", string1, now, string2] dataUsingEncoding:NSUTF8StringEncoding];
So for I have created a helper class and I have this:
var authTime = GetTimeIntervalSince1970(DateTime.Now);
var authDataString = String.Format("{0}{1}{2]",username, authTime, password);
So, my question is the "%.0f" and the "dataUsingEncoding:NSTimeInterval". I know the first part has something to do with formatting the "now" parameter, what do I need to do to make sure I'm doing the same thing in c#, and can someone explain this to me in detail or direct me to an article/blog I should read?
Thanks!
Update: Okay guys I messed up, I'm sorry I copied and pasted wrong which is party of my confusion. the dataUsingEncoding:NSTimeInterval should read: dataUsingEncoding:NSUTF8StringEncoding. So I have fixed the post.