Browsing 7239 questions and answers with Jon Skeet
Yes - read the error message. You've already got a variable called row in your method, so you need to choose a different name for the parameter in the lambda expression. For example: NewDt = NewDt.Rows.Cast(Of DataRow)(). ... more 3/14/2014 7:04:55 AM
An integer value itself (e.g. an int) doesn't have a base, really. It's just a number. Bases are mostly important for textual representations. (They're also important in floating point numbers as that determines what sort of point is... more 3/14/2014 6:58:35 AM
See below for why the existing code isn't working for you, and a workaround. However, to preserve the UTC offset and do the whole thing far more simply, I suspect you just want to use DatatypeFactory.newXMLGregorianCalendar(String): //... more 3/13/2014 3:53:34 PM
Aside from the vast number of pointless comparisons you're making, the first problem is that you're ignoring the result of Stream.Read... and instead creating a string out of the whole 1024 bytes within message. If you change it to: int... more 3/13/2014 3:19:01 PM
I thin, it can not recognize lia as string. No, it's recognizing it just fine - but as the error says, you can't use the value of one instance variable within the initializer for another. The simplest fix is usually to put the... more 3/13/2014 12:54:29 PM
Reflection is the best fit here in general (it's a pretty unusual requirement) but something else that would at least work would be to use overload resolution: provide alternative methods with a parameter of float, long and Double, but... more 3/13/2014 11:41:54 AM
and after all when want to use inside Heartbeate I cant access protocol.Name inside constructor - how to access that? You can't, while it's protected. protected is designed to give access to protected members of objects of type Foo... more 3/13/2014 9:47:08 AM
The result of ++x or x++ is categorized as a value, not a variable - and both operators will only work on variables. For example, from section 15.14.2 of the JLS: A postfix expression followed by a ++ operator is a postfix increment... more 3/13/2014 8:13:42 AM
Your interface isn't covariant - it needs to be explicitly covariant when you declare it. So this: interface iBaseService<T> where T : mymodels.mybase should be: interface iBaseService<out T> where T :... more 3/12/2014 5:22:34 PM
Well that would be a valid nested class, but it wouldn't implement Map.Entry, so it couldn't be used for the Map methods which require Map.Entry, such as entrySet(). The reason it's declared with the static modifier is that a... more 3/12/2014 5:18:28 PM