|
People like to make things hard for themselves. What was this guy smoking when he was coding? My thoughts are that he's an ex-C++ programming who landed a C# project.
Looks like this is part of the BO layer that works with multiple databases (db) that contains exchange rates. The database pointer is passed down to the data access layer, data is retrieved and parsed into a simple list and returned to the caller.
Not exactly an efficient way of doing it...
Am I close?
|
|
|
|
|
You're close. It's very similar to a common error new C++ developers make, and is something that garbage collection is supposed to fix, but they've managed to do it in C#. Think about the lifetime of the objects created in the loop and the using statement.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
Yeah... Trying to return data that's already expired! Nice one... lol
|
|
|
|
|
Yeah, since the dispose method closes database connections, then just wrap the object in a using and it will be automatically closed.
They cut and pasted a standard dispose method including the check that it only runs once, so you can only close the database connection once, which is only an issue when you save one of the objects.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
I don't understand .Net memory management myself... I seriously think a delete operator wouldnt hurt. Why is there a new and no delete ? I don't blame this guy for making mistakes, at least his code is well formatted. I work on VB code that looks like it was written by monkies in a scientific experiment.
|
|
|
|
|
so,
for(int i=0; i<source.length;> {
result[i] = source[i];
source[i].~object();
result[i].~object();
}
return result;
Makes sense to you?
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
Complete class provided for entertainment purposes
<font color="Blue">namespace</font> BusinessEntities
<font color="DarkBlue">{</font>
<font color="Blue">public</font> <font color="Blue">class</font> <font color="Teal">DropDownLists</font>
<font color="DarkBlue">{</font>
<font color="Blue">private</font> <font color="Teal">Collection</font><font color="DarkBlue"><</font><font color="Teal">ListItem</font><font color="DarkBlue">></font> myList<font color="DarkBlue">;</font>
<font color="Blue">public</font> <font color="Blue">static</font> <font color="Teal">DropDownLists</font> Construct_DropDownLists<font color="DarkBlue">(</font><font color="DarkBlue">)</font>
<font color="DarkBlue">{</font>
<font color="Teal">DropDownLists</font> tmpDropDownLists <font color="DarkBlue">=</font> <font color="Blue">new</font> <font color="Teal">DropDownLists</font><font color="DarkBlue">(</font><font color="DarkBlue">)</font><font color="DarkBlue">;</font>
<font color="Blue">return</font> tmpDropDownLists<font color="DarkBlue">;</font>
<font color="DarkBlue">}</font>
<font color="Blue">public</font> <font color="Teal">Collection</font><font color="DarkBlue"><</font><font color="Teal">ListItem</font><font color="DarkBlue">></font> MyList
<font color="DarkBlue">{</font>
<font color="Blue">get</font>
<font color="DarkBlue">{</font>
<font color="Blue">if</font> <font color="DarkBlue">(</font>myList <font color="DarkBlue">==</font> <font color="Blue">null</font><font color="DarkBlue">)</font>
<font color="DarkBlue">{</font>
myList <font color="DarkBlue">=</font> <font color="Blue">new</font> <font color="Teal">Collection</font><font color="DarkBlue"><</font><font color="Teal">ListItem</font><font color="DarkBlue">></font><font color="DarkBlue">(</font><font color="DarkBlue">)</font><font color="DarkBlue">;</font>
<font color="DarkBlue">}</font>
<font color="Blue">return</font> myList<font color="DarkBlue">;</font>
<font color="DarkBlue">}</font>
<font color="Blue">set</font> <font color="DarkBlue">{</font> myList <font color="DarkBlue">=</font> <font color="Blue">value</font><font color="DarkBlue">;</font> <font color="DarkBlue">}</font>
<font color="DarkBlue">}</font>
<font color="DimGray"> <font color="DimGray"> <font color="DimGray"> <font color="DimGray"> <font color="DimGray"> <font color="Blue">public</font> <font color="Teal">Collection</font><font color="DarkBlue"><</font><font color="Teal">ListItem</font><font color="DarkBlue">></font> GetTitles<font color="DarkBlue">(</font><font color="Teal">DropDownLists</font> tmpDropDownLists<font color="DarkBlue">)</font>
<font color="DarkBlue">{</font>
<font color="DarkGreen">
tmpDropDownLists<font color="DarkBlue">.</font>myList <font color="DarkBlue">=</font> <font color="Blue">new</font> <font color="Teal">Collection</font><font color="DarkBlue"><</font><font color="Teal">ListItem</font><font color="DarkBlue">></font><font color="DarkBlue">(</font><font color="DarkBlue">)</font><font color="DarkBlue">;</font>
<font color="Teal">ListItem</font> li <font color="DarkBlue">=</font> <font color="Blue">new</font> <font color="Teal">ListItem</font><font color="DarkBlue">(</font><font color="DarkBlue">)</font><font color="DarkBlue">;</font>
li<font color="DarkBlue">.</font>Value <font color="DarkBlue">=</font> <font color="Maroon">"1"</font><font color="DarkBlue">;</font>
li<font color="DarkBlue">.</font>Text <font color="DarkBlue">=</font> <font color="Maroon">"Mr."</font><font color="DarkBlue">;</font>
tmpDropDownLists<font color="DarkBlue">.</font>myList<font color="DarkBlue">.</font>Add<font color="DarkBlue">(</font>li<font color="DarkBlue">)</font><font color="DarkBlue">;</font>
li <font color="DarkBlue">=</font> <font color="Blue">new</font> <font color="Teal">ListItem</font><font color="DarkBlue">(</font><font color="DarkBlue">)</font><font color="DarkBlue">;</font>
li<font color="DarkBlue">.</font>Value <font color="DarkBlue">=</font> <font color="Maroon">"2"</font><font color="DarkBlue">;</font>
li<font color="DarkBlue">.</font>Text <font color="DarkBlue">=</font> <font color="Maroon">"Mrs."</font><font color="DarkBlue">;</font>
tmpDropDownLists<font color="DarkBlue">.</font>myList<font color="DarkBlue">.</font>Add<font color="DarkBlue">(</font>li<font color="DarkBlue">)</font><font color="DarkBlue">;</font>
li <font color="DarkBlue">=</font> <font color="Blue">new</font> <font color="Teal">ListItem</font><font color="DarkBlue">(</font><font color="DarkBlue">)</font><font color="DarkBlue">;</font>
li<font color="DarkBlue">.</font>Value <font color="DarkBlue">=</font> <font color="Maroon">"3"</font><font color="DarkBlue">;</font>
li<font color="DarkBlue">.</font>Text <font color="DarkBlue">=</font> <font color="Maroon">"Me."</font><font color="DarkBlue">;</font>
tmpDropDownLists<font color="DarkBlue">.</font>myList<font color="DarkBlue">.</font>Add<font color="DarkBlue">(</font>li<font color="DarkBlue">)</font><font color="DarkBlue">;</font>
li <font color="DarkBlue">=</font> <font color="Blue">new</font> <font color="Teal">ListItem</font><font color="DarkBlue">(</font><font color="DarkBlue">)</font><font color="DarkBlue">;</font>
li<font color="DarkBlue">.</font>Value <font color="DarkBlue">=</font> <font color="Maroon">"4"</font><font color="DarkBlue">;</font>
li<font color="DarkBlue">.</font>Text <font color="DarkBlue">=</font> <font color="Maroon">"Dr."</font><font color="DarkBlue">;</font>
tmpDropDownLists<font color="DarkBlue">.</font>myList<font color="DarkBlue">.</font>Add<font color="DarkBlue">(</font>li<font color="DarkBlue">)</font><font color="DarkBlue">;</font>
li <font color="DarkBlue">=</font> <font color="Blue">new</font> <font color="Teal">ListItem</font><font color="DarkBlue">(</font><font color="DarkBlue">)</font><font color="DarkBlue">;</font>
li<font color="DarkBlue">.</font>Value <font color="DarkBlue">=</font> <font color="Maroon">"5"</font><font color="DarkBlue">;</font>
li<font color="DarkBlue">.</font>Text <font color="DarkBlue">=</font> <font color="Maroon">"Prof."</font><font color="DarkBlue">;</font>
tmpDropDownLists<font color="DarkBlue">.</font>myList<font color="DarkBlue">.</font>Add<font color="DarkBlue">(</font>li<font color="DarkBlue">)</font><font color="DarkBlue">;</font>
<font color="Blue">string</font><font color="DarkBlue">[]</font> myKeys <font color="DarkBlue">=</font> <font color="Blue">new</font> <font color="Blue">string</font><font color="DarkBlue">[</font>tmpDropDownLists<font color="DarkBlue">.</font>myList<font color="DarkBlue">.</font>Count<font color="DarkBlue">]</font><font color="DarkBlue">;</font>
<font color="Blue">string</font><font color="DarkBlue">[]</font> myValues <font color="DarkBlue">=</font> <font color="Blue">new</font> <font color="Blue">string</font><font color="DarkBlue">[</font>tmpDropDownLists<font color="DarkBlue">.</font>myList<font color="DarkBlue">.</font>Count<font color="DarkBlue">]</font><font color="DarkBlue">;</font>
<font color="Blue">int</font> counter <font color="DarkBlue">=</font> <font color="Red">0</font><font color="DarkBlue">;</font>
<font color="Blue">foreach</font> <font color="DarkBlue">(</font><font color="Teal">ListItem</font> lit <font color="Blue">in</font> tmpDropDownLists<font color="DarkBlue">.</font>myList<font color="DarkBlue">)</font>
<font color="DarkBlue">{</font>
myKeys<font color="DarkBlue">[</font>counter<font color="DarkBlue">]</font> <font color="DarkBlue">=</font> lit<font color="DarkBlue">.</font>Value<font color="DarkBlue">;</font>
myValues<font color="DarkBlue">[</font>counter<font color="DarkBlue">]</font> <font color="DarkBlue">=</font> lit<font color="DarkBlue">.</font>Text<font color="DarkBlue">;</font>
counter<font color="DarkBlue">++</font><font color="DarkBlue">;</font>
<font color="DarkBlue">}</font>
<font color="Teal">Collection</font><font color="DarkBlue"><</font><font color="Teal">ListItem</font><font color="DarkBlue">></font> tmpList <font color="DarkBlue">=</font> <font color="Blue">this</font><font color="DarkBlue">.</font>SortItemsAlphabetically<font color="DarkBlue">(</font>myKeys<font color="DarkBlue">,</font> myValues<font color="DarkBlue">)</font><font color="DarkBlue">;</font>
tmpDropDownLists<font color="DarkBlue">.</font>myList <font color="DarkBlue">=</font> tmpList<font color="DarkBlue">;</font>
<font color="Blue">return</font> tmpDropDownLists<font color="DarkBlue">.</font>myList<font color="DarkBlue">;</font>
<font color="DarkBlue">}</font>
<font color="DimGray"> <font color="DimGray"> <font color="DimGray"> <font color="DimGray"> <font color="DimGray"> <font color="Blue">public</font> <font color="Teal">Collection</font><font color="DarkBlue"><</font><font color="Teal">ListItem</font><font color="DarkBlue">></font> GetCountries<font color="DarkBlue">(</font><font color="Teal">DropDownLists</font> tmpDropDownLists<font color="DarkBlue">)</font>
<font color="DarkBlue">{</font>
<font color="DarkGreen">
tmpDropDownLists<font color="DarkBlue">.</font>myList <font color="DarkBlue">=</font> <font color="Blue">new</font> <font color="Teal">Collection</font><font color="DarkBlue"><</font><font color="Teal">ListItem</font><font color="DarkBlue">></font><font color="DarkBlue">(</font><font color="DarkBlue">)</font><font color="DarkBlue">;</font>
<font color="Teal">ListItem</font> li <font color="DarkBlue">=</font> <font color="Blue">new</font> <font color="Teal">ListItem</font><font color="DarkBlue">(</font><font color="DarkBlue">)</font><font color="DarkBlue">;</font>
li <font color="DarkBlue">=</font> <font color="Blue">new</font> <font color="Teal">ListItem</font><font color="DarkBlue">(</font><font color="Maroon">"Argentina"</font><font color="DarkBlue">,</font> <font color="Maroon">"AR"</font><font color="DarkBlue">)</font><font color="DarkBlue">;</font>
tmpDropDownLists<font color="DarkBlue">.</font>myList<font color="DarkBlue">.</font>Add<font color="DarkBlue">(</font>li<font color="DarkBlue">)</font><font color="DarkBlue">;</font>
li <font color="DarkBlue">=</font> <font color="Blue">new</font> <font color="Teal">ListItem</font><font color="DarkBlue">(</font><font color="Maroon">"Bangladesh"</font><font color="DarkBlue">,</font> <font color="Maroon">"BD"</font><font color="DarkBlue">)</font><font color="DarkBlue">;</font>
tmpDropDownLists<font color="DarkBlue">.</font>myList<font color="DarkBlue">.</font>Add<font color="DarkBlue">(</font>li<font color="DarkBlue">)</font><font color="DarkBlue">;</font>
<font color="DarkGreen">
li <font color="DarkBlue">=</font> <font color="Blue">new</font> <font color="Teal">ListItem</font><font color="DarkBlue">(</font><font color="Maroon">"Venezuela"</font><font color="DarkBlue">,</font> <font color="Maroon">"VE"</font><font color="DarkBlue">)</font><font color="DarkBlue">;</font>
tmpDropDownLists<font color="DarkBlue">.</font>myList<font color="DarkBlue">.</font>Add<font color="DarkBlue">(</font>li<font color="DarkBlue">)</font><font color="DarkBlue">;</font>
li <font color="DarkBlue">=</font> <font color="Blue">new</font> <font color="Teal">ListItem</font><font color="DarkBlue">(</font><font color="Maroon">"Vietnam"</font><font color="DarkBlue">,</font> <font color="Maroon">"VN"</font><font color="DarkBlue">)</font><font color="DarkBlue">;</font>
tmpDropDownLists<font color="DarkBlue">.</font>myList<font color="DarkBlue">.</font>Add<font color="DarkBlue">(</font>li<font color="DarkBlue">)</font><font color="DarkBlue">;</font>
<font color="Blue">string</font><font color="DarkBlue">[]</font> myKeys <font color="DarkBlue">=</font> <font color="Blue">new</font> <font color="Blue">string</font><font color="DarkBlue">[</font>tmpDropDownLists<font color="DarkBlue">.</font>myList<font color="DarkBlue">.</font>Count<font color="DarkBlue">]</font><font color="DarkBlue">;</font>
<font color="Blue">string</font><font color="DarkBlue">[]</font> myValues <font color="DarkBlue">=</font> <font color="Blue">new</font> <font color="Blue">string</font><font color="DarkBlue">[</font>tmpDropDownLists<font color="DarkBlue">.</font>myList<font color="DarkBlue">.</font>Count<font color="DarkBlue">]</font><font color="DarkBlue">;</font>
<font color="Blue">int</font> counter <font color="DarkBlue">=</font> <font color="Red">0</font><font color="DarkBlue">;</font>
<font color="Blue">foreach</font> <font color="DarkBlue">(</font><font color="Teal">ListItem</font> lit <font color="Blue">in</font> tmpDropDownLists<font color="DarkBlue">.</font>myList<font color="DarkBlue">)</font>
<font color="DarkBlue">{</font>
myKeys<font color="DarkBlue">[</font>counter<font color="DarkBlue">]</font> <font color="DarkBlue">=</font> lit<font color="DarkBlue">.</font>Value<font color="DarkBlue">;</font>
myValues<font color="DarkBlue">[</font>counter<font color="DarkBlue">]</font> <font color="DarkBlue">=</font> lit<font color="DarkBlue">.</font>Text<font color="DarkBlue">;</font>
counter<font color="DarkBlue">++</font><font color="DarkBlue">;</font>
<font color="DarkBlue">}</font>
<font color="Teal">Collection</font><font color="DarkBlue"><</font><font color="Teal">ListItem</font><font color="DarkBlue">></font> tmpList <font color="DarkBlue">=</font> <font color="Blue">this</font><font color="DarkBlue">.</font>SortItemsAlphabetically<font color="DarkBlue">(</font>myKeys<font color="DarkBlue">,</font> myValues<font color="DarkBlue">)</font><font color="DarkBlue">;</font>
tmpDropDownLists<font color="DarkBlue">.</font>myList <font color="DarkBlue">=</font> tmpList<font color="DarkBlue">;</font>
<font color="Blue">return</font> tmpDropDownLists<font color="DarkBlue">.</font>myList<font color="DarkBlue">;</font>
<font color="DarkBlue">}</font>
<font color="DimGray"> <font color="DimGray"> <font color="DimGray"> <font color="DimGray"> <font color="DimGray"> <font color="DimGray"> <font color="Blue">private</font> <font color="Teal">Collection</font><font color="DarkBlue"><</font><font color="Teal">ListItem</font><font color="DarkBlue">></font> SortItemsAlphabetically<font color="DarkBlue">(</font><font color="Blue">string</font><font color="DarkBlue">[]</font> myKeys<font color="DarkBlue">,</font> <font color="Blue">string</font><font color="DarkBlue">[]</font> myValues<font color="DarkBlue">)</font>
<font color="DarkBlue">{</font>
<font color="Teal">Collection</font><font color="DarkBlue"><</font><font color="Teal">ListItem</font><font color="DarkBlue">></font> list <font color="DarkBlue">=</font> <font color="Blue">new</font> <font color="Teal">Collection</font><font color="DarkBlue"><</font><font color="Teal">ListItem</font><font color="DarkBlue">></font><font color="DarkBlue">(</font><font color="DarkBlue">)</font><font color="DarkBlue">;</font>
<font color="DarkGreen">
Array<font color="DarkBlue">.</font>Sort<font color="DarkBlue">(</font>myKeys<font color="DarkBlue">,</font> myValues<font color="DarkBlue">,</font> <font color="Red">1</font><font color="DarkBlue">,</font> <font color="Red">3</font><font color="DarkBlue">)</font><font color="DarkBlue">;</font>
<font color="Blue">for</font> <font color="DarkBlue">(</font><font color="Blue">int</font> i <font color="DarkBlue">=</font> <font color="Red">0</font><font color="DarkBlue">;</font> i <font color="DarkBlue"><</font> myKeys<font color="DarkBlue">.</font>Length<font color="DarkBlue">;</font> i<font color="DarkBlue">++</font><font color="DarkBlue">)</font>
<font color="DarkBlue">{</font>
<font color="Teal">ListItem</font> lit <font color="DarkBlue">=</font> <font color="Blue">new</font> <font color="Teal">ListItem</font><font color="DarkBlue">(</font>myValues<font color="DarkBlue">[</font>i<font color="DarkBlue">]</font><font color="DarkBlue">.</font>ToString<font color="DarkBlue">(</font><font color="DarkBlue">)</font><font color="DarkBlue">,</font> myKeys<font color="DarkBlue">[</font>i<font color="DarkBlue">]</font><font color="DarkBlue">.</font>ToString<font color="DarkBlue">(</font><font color="DarkBlue">)</font><font color="DarkBlue">)</font><font color="DarkBlue">;</font>
list<font color="DarkBlue">.</font>Add<font color="DarkBlue">(</font>lit<font color="DarkBlue">)</font><font color="DarkBlue">;</font>
<font color="DarkBlue">}</font>
<font color="Blue">return</font> list<font color="DarkBlue">;</font>
<font color="DarkBlue">}</font>
<font color="DarkBlue">}</font>
<font color="DarkBlue">}</font>
|
|
|
|
|
Congratulations to these "self-studies".
-+--+--+--+--+--+--+-+-+-+
Carlos Zani - SP - Brazil
Powered by Microsof.Net
|
|
|
|
|
But which part do you particularly wish to point out?
I find the use of string.ToString() the most humorous.
I'm also not sure what you mean by the title;
Array.Sort(myKeys, myValues, 1, 3);
won't "Sort by the first 3 characters", it sorts the second through fourth items.
modified on Sunday, June 8, 2008 11:14 AM
|
|
|
|
|
PIEBALDconsult wrote: I'm also not sure what you mean by the title;
Array.Sort(myKeys, myValues, 1, 3);
won't "Sort by the first 3 characters", it sorts the second through fourth items.
Exactly
Thats the real horror, how he gets there is a horror too!
All this has been reduced to 2 lines of code getting data straight from the DB.
|
|
|
|
|
|
This enhances readability.
Greetings from Germany
|
|
|
|
|
leppie wrote: /// /// This method can be customized to return a list of data from any source, e.g database, xml file, object, etc. /// /// <param name="tmpDropDownLists" />Object instance of DropDownLists class. /// <returns>ItemCollection<string> public Collection<listitem> GetTitles(DropDownLists tmpDropDownLists) { //Currently the data is hardcoded, but can also be queried from a database. tmpDropDownLists.myList = new Collection<listitem>(); ListItem li = new ListItem(); li.Value = "1"; li.Text = "Mr."; tmpDropDownLists.myList.Add(li); li = new ListItem(); li.Value = "2"; li.Text = "Mrs."; tmpDropDownLists.myList.Add(li); li = new ListItem(); li.Value = "3"; li.Text = "Me."; tmpDropDownLists.myList.Add(li); li = new ListItem(); li.Value = "4"; li.Text = "Dr."; tmpDropDownLists.myList.Add(li); li = new ListItem(); li.Value = "5"; li.Text = "Prof."; tmpDropDownLists.myList.Add(li);
Oh, if only there existed some technology where you could add items from some source of data. That would be sure to catch on.
|
|
|
|
|
Only if you publish documentation... perhaps on a website.
|
|
|
|
|
A team member wrote this peace of code and I still don't know what she wanted with:
string _attempt = "3";
if( _attempt.ToUpper() == 3 )
OMG, sometimes I ask myself: Will not be better if I was pastryman?
-+--+--+--+--+--+--+-+-+-+
Carlos Zani - SP - Brazil
Powered by Microsof.Net
|
|
|
|
|
I wonder if you are using the same guy as we did!
|
|
|
|
|
This kind of person is in anywhere.
-+--+--+--+--+--+--+-+-+-+
Carlos Zani - SP - Brazil
Powered by Microsof.Net
|
|
|
|
|
See my 'little' horror I just posted.
|
|
|
|
|
Zani Jnior wrote: sometimes I ask myself: Will not be better if I was pastryman?
I often ask myself the very same thing.
We have a running joke at work : there are career opportunities at Taco Bell.
|
|
|
|
|
I just realized I use stuff like that all the time.
Well, for testing anyway.
Especially when I'm not sure what the check will be later.
For example I first write the code between the parenthesis and add the check at a later time, but in the mean time, I can't leave it empty because that makes debugging the code in the parenthesis harder.
Maybe the team member wasn't done testing or forgot he wasn't done.
|
|
|
|
|
Zani Jnior wrote: I still don't know what she wanted with
Beats me with what she was trying to accomplish
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Today I had to write something I consider a horror. It's very much like some similarly bad code that's been exposed here, but no other solution came immediately to mind... and it works.
Without going into detail, I have a form that dynamically creates its controls according to an XML document.
So, if the document specifies "System.DateTime" a DateTimePicker will be instantiated and added to the form.
I also decided to add the ability to control the format via the XML, by setting the CustomFormat property.
All is well and good.
Today I was writing one of these XML documents and needed a DateTime with format "yyyy-MM-dd", simple enough, works great.
Until I realized that I also needed to truncate the DateTime (zero-out the time-of-day part in this case).
Truncating a DateTime is no big deal; I even wrote a (poorly-received) article[^] on it.
But that solution won't work well in this case; I wanted a way to truncate based on the provided format.
After a little thought I had the solution, but it feels so dirty:
mydate = System.DateTime.ParseExact ( mydate.ToString ( format ) , format , null ) ;
I haven't tested it extensively; I'm afraid of what I might find.
|
|
|
|
|
PIEBALDconsult wrote: Until I realized that I also needed to truncate the DateTime (zero-out the time-of-day part in this case).
Maybe I misunderstood you, but couldn't you just use mydate.Date ?
Mostly, when you see programmers, they aren't doing anything. One of the attractive things about programmers is that you cannot tell whether or not they are working simply by looking at them. Very often they're sitting there seemingly drinking coffee and gossiping, or just staring into space. What the programmer is trying to do is get a handle on all the individual and unrelated ideas that are scampering around in his head. (Charles M Strauss)
|
|
|
|
|
I was just going to say the same, you beat me by 5 minutes
|
|
|
|
|
No, because I'm provided the format at runtime -- read from an XML file.
The format could be any valid format for a DateTime.
|
|
|
|