iformatprovider Questions
9
Solved
I was playing around with the Datetime.ParseExact method, and it wants an IFormatProvider...
It works giving null as input, but what exactly does it do?
Trivalent asked 3/2, 2009 at 10:46
1
I am wondering why Code Analysis rule CA1305 - Specify IFormatProvider doesn't work for TryParse methods?
For example with 'Microsoft All Rules' rule set, Code Analysis gives CA1305 warning for fo...
Incomprehensible asked 10/10, 2012 at 12:49
1
Solved
String formatting in C#;
Can I use it? Yes.
Can I implement custom formatting? No.
I need to write something where I can pass a set of custom formatting options to string.Format, which will hav...
Chisholm asked 23/2, 2016 at 11:57
1
Solved
If we're using the ParseExact method for exact date-time's parsing using a specified format, why do we need to provide a IFormatProvider object? what is the point behind it?
For example:
DateTime...
Lethargy asked 23/9, 2013 at 14:13
2
Solved
How do I pass an IFormatProvider to a StreamWriter?
Specifically I want to create a
new StreamWriter("myfile.txt", CultureInfo.InvariantCulture);
TextWriter and StringWriter have a parameter for ...
Stilly asked 17/8, 2012 at 19:9
6
Solved
We're currently using the following for creating US dollar values in our web application:
string.Format("{0:C0}", dollarValue );
In this example, if dollarValue is 145, then we'll see: $145. If ...
Astronautics asked 13/6, 2012 at 12:32
3
Solved
I tried running FxCop on a few assemblies of our product, and I get lots and lots of matches of the "Specify IFormatProvider" rule.
As it happens, some of those are legitimate, but it also matches...
Hallowell asked 8/8, 2011 at 9:46
4
Solved
I need to display a currency in my ASP.NET MVC application but when the currency is 0 I would like it to display "Free" (localized of course!) instead of $0.00.
So when I have something like this....
Centralize asked 5/10, 2010 at 18:55
1
Solved
So, maybe this is a bad design; I don't know. But say I have a DataTable with a column that holds int values; these values are in fact meant to represent some enum type that I have in my project.
...
Fisticuffs asked 23/8, 2010 at 20:48
3
Solved
I was trying to create an IFormatProvider implementation that would recognize custom format strings for DateTime objects. Here is my implementation:
public class MyDateFormatProvider : IFormatPro...
Omsk asked 4/3, 2010 at 19:34
1
© 2022 - 2024 — McMap. All rights reserved.