Browsing 7239 questions and answers with Jon Skeet
override sealed is valid because it says "I'm overriding a base class method, but derived classes can't override me." That makes sense. One part of it is talking about the relationship to its base class; the other is talking about the... more 2/4/2015 6:54:25 AM
Well you can use < and > with DateTime values, so you can do something like: Dim lowerBound As DateTime = ... Dim upperBound As DateTime = ... ... in the query ... Where lowerBound <= Row.Field(Of DateTime)("date") AndAlso ... more 2/3/2015 5:42:22 PM
No, you can't do that with List<T> directly. However, you could declare: IEnumerable<int> union = list1.Union(list2); Now that will be lazily evaluated - every time you iterate over union, it will return every integer which... more 2/3/2015 5:19:18 PM
Do I have information loss when I assign the long variable to the float variable? Potentially, yes. That should be fairly clear from the fact that long has 64 bits of information, whereas float has only 32. More specifically, as... more 2/3/2015 5:03:44 PM
Absolutely - if you don't specify anything, you still get the same effect as with the new modifier, but you get a warning as well. There's also explicit interface implementation, of course. In both cases, just casting the target to a... more 2/3/2015 4:09:31 PM
I suspect the problem here is just the lack of a T in the value. Note that the idea of "a LocalDateTime [...] but in UTC" is meaningless. A LocalDateTime value has no time zone. The simplest fix is probably just to create a... more 2/3/2015 3:24:25 PM
You've made two mistakes: There's no AssumeRoleWithWebIdentityResponse element under the root element; it is the root element The AssumeRoleWithWebIdentityResponse element is in a namespace (https://sts.amazonaws.com/doc/2011-06-15/") so... more 2/3/2015 2:49:59 PM
Just use the TimeOfDay property to extract the time within the day, and add that to the date you want: private static readonly DateTime BaseDate = new DateTime(1900, 1, 1); var updatedDateTime = BaseDate + otherDateTime.TimeOfDay; You... more 2/3/2015 2:45:57 PM
I want to, wherever an array of a specific class is going to be initialized to run a c++ code, since that class is wrapped. No, you can't do that. The array will always be an array of references to instances of the class, always... more 2/3/2015 2:23:36 PM
This is the C# code you've got for converting the userCode string to bytes: byte[] bytes = Encoding.Unicode.GetBytes(code); And the Java code is just: userCode.getBytes() That means in Java you're using the platform-default encoding,... more 2/3/2015 1:52:54 PM