Browsing 7239 questions and answers with Jon Skeet
In all date instances has the same time zone Europe/Moscow A Date instance doesn't have a time zone - it's just an instant in time. But you should probably specify the time zone for your formatter, e.g. dateTimeFormat =... more 4/22/2015 2:55:45 PM
Just handle item.Language being null in your view: <p>@item.Language == null ? "" : @item.Language.LanguageSpoken</p> In C# 6 this is even simpler: <p>@item.Language?.LanguageSpoken</p> (Assuming that null... more 4/22/2015 2:39:38 PM
Your JSON doesn't contain any RootObject objects - it just contains strings. You've got an array of arrays of strings, where each "nested" array just contains a single string, and each string is the JSON representation of a RootObject. If... more 4/22/2015 8:47:03 AM
You're calling Single(), which means you've got one result. ToList() is an extension method on IEnumerable<T>. If you want to create a list with just that one element, you could write: return new List<UsersTabPage> { firstone... more 4/21/2015 7:29:06 PM
At compilation time, it doesn't usually matter - you just specify all the source files you want to compile. (You can specify a subset and the compiler will find other source files it needs, but it's better to specify everything you want... more 4/21/2015 4:06:27 PM
You can only return a single value from a method call. However, that value can be an array or a collection. Two options to consider: Change your method to accept a second parameter of "the character to count" occurrences of, and call it... more 4/21/2015 2:50:35 PM
Why is this second syntax ok when it looks like it deviates wildly from the first? It doesn't deviate at all from the first. Part First example Second example Access modifier private ... more 4/21/2015 12:35:56 PM
My goal with ClassRoom(Person person) is that, if the Person is null, ClassRoom() is called and if it's not null ClassRoom(Person person, string name) is called. You can't do that, basically. You can't decide which constructor to... more 4/21/2015 10:14:34 AM
In this fiddle, we are assigning a static field to an instance field. Right. That copies the current value of the static field to the instance field. It doesn't tie the variables together forever - it just copies the current... more 4/21/2015 5:54:39 AM
There's another alternative: return an InputStream. The idea is presumably that you're returning the data resulting from the operation. As such, returning an output stream seems very odd to me. To return data, you'd normally either return... more 4/21/2015 5:51:33 AM