Browsing 7239 questions and answers with Jon Skeet
No, in the C# code you've got private setters - in your Java code they're public. The C# equivalent to the Java code would be: public string Var1 { get; set; } public int Var2 { get; set; } (I've changed the names to follow .NET naming... more 6/2/2015 7:06:48 PM
I'd probably use DataOutputStream - write out the number of vertices, then the vertices themselves. Then write out the number of indices, then the indices. This will always use big-endianness, and should be easy enough to read/write on... more 6/2/2015 6:32:55 PM
You want dd instead of DD when you construct the SimpleDateFormat. DD means "day of year", not "day of month". Every time SimpleDateFormat looks like it's doing the wrong thing, you should consult the documentation and check your pattern... more 6/2/2015 5:52:49 PM
My question however is why the enumerator implementations do not return immutable objects How would you expect them to do that? They're sequences of whatever type is used - what would you expect to happen with something like: var... more 6/2/2015 3:19:57 PM
My question is this: Is it possible to keep using await async in the CreateStuff method and still wait for the completion of the CreateStuff() method in button1_Click() before displaying the message box? Absolutely - but you need to... more 6/2/2015 3:13:11 PM
To add to the other answers which suggest using Task.FromResult to create a task, you could also use an async lambda expression - this would be useful if you want to use await within the body of the lambda... more 6/2/2015 2:39:12 PM
I mean, package hierachy is already described/enforced using the folder structure of the file system. Not necessarily. While it's certainly a good idea to organize your code that way, it's not a requirement. Also bear in mind that... more 6/2/2015 2:34:37 PM
Why UpCasting does not require explicit casting ? Because it's always safe. It's never going to throw an exception. Why DownCasting requires explicit casting ? Because it's not safe. It can throw an exception, or lose... more 6/2/2015 12:44:28 PM
Sure - it's simple a matter of precedence. The (Microsoft) C# specification lists operator precedence in section 7.3.1 (in the C# 4 and C# 5 specifications, anyway; it's 7.2.1 in the C# 3 spec), although that's only really an informative... more 6/2/2015 8:27:36 AM
The "extra" logging is there because you logged it here: func dataOfJson(url: String) -> NSArray { var urla = NSURL(string: url) var data:NSData = NSData(contentsOfURL: urla!)! println(data) // This is printing the hex... more 6/2/2015 6:05:20 AM