Browsing 7239 questions and answers with Jon Skeet
I would use DateTimeOffset.ParseExact, specifying the format string an the invariant culture: DateTimeOffset value = DateTimeOffset.ParseExact(text, "yyyy-MM-dd'T'HH:mm:ssK", ... more 5/23/2014 1:04:37 PM
I believe the problem is that you're trying to use a method which you've asked for via a class you don't have access to. That apparently implicitly limits the method's visibility, even though the method itself is public. Here's a similar... more 5/23/2014 12:46:34 PM
If you mean for the display part of the anchor tag, everything should be fine - you should be getting ASP.NET MVC to perform any escaping required to represent your text properly in HTML, e.g. using @Html.AnchorLink(...). It's far better... more 5/23/2014 12:23:29 PM
There are two many problems with the current code: It's inefficient in terms of reading the data It's synchronously writing the data, which is obviously a problem if you're on the UI thread The "write the data asynchronously" is... more 5/23/2014 9:51:04 AM
It just means it's an empty parameter list - for delegate types which don't have any parameters. The fact that you can write x => x.Id is really just a shorthand for (x) => x.Id which is in turn a shorthand for (Vehicle x) =>... more 5/23/2014 9:01:49 AM
It sounds like you've already got the parsing part sorted - that's entirely separate from the formatting part. For formatting, I suspect you want: DateFormat localeFormat = DateFormat.getDateInstance(DateFormat.MEDIUM, locale); String... more 5/23/2014 8:03:32 AM
If you want to format a date, you need to use DateFormat or something similar. A Date is just an instant in time - the number of milliseconds since the Unix epoch. It doesn't have any idea of time zone, calendar system or format. The... more 5/23/2014 5:50:24 AM
Just use the overload which takes a single parameter - the start point: str = str.Substring(str.Length - 4); Or better, use a method designed to get the extension of a filename - Path.GetExtension: string extension =... more 5/22/2014 6:59:38 PM
Well, this is certainly an odd declaration: internal class SubclaseGenerica<T> : ClaseBase <long> { } In this case, it's a generic type - so it's declaring a new type parameter T. However, it's supplying a type argument of... more 5/22/2014 6:48:35 PM
Now we know the plugin you're using, it's easy. Just read the documentation on "Using .NET assemblies". In particular, it sounds like you want: //css_reference iTextSharp.dll; That's assuming the library is one of the locations CSScript... more 5/22/2014 6:42:28 PM