try
{
try
{
_isSelected = (bool)_dgvRow.Cells["Selected"].Value;
}
catch (ArgumentException)
{
_isSelected = (bool)_dgvRow.Cells["IsSelected"].Value;
}
}
catch (Exception)
{
//Temp Hack in case "Selected" Column does not exist
}
rusyn
@rusyn
Best posts made by rusyn
Latest posts made by rusyn
-
RE: Signs of things to come
-
Signs of things to come
I've been tasked with adding new functionality to an existing C# Windows application. Having a read through the code to (try) understand what/when/how, I come across the "ExportToExcel" function...
Microsoft.Office.Interop.Excel.Application xlApp = new Microsoft.Office.Interop.Excel.Application();
if (xlApp == null)
{
Console.WriteLine("EXCEL could not be started. Check that your office installation and project references are correct.");// snip
}
-
RE: Private global
@sui said:
For those who asked for more context... $text[type][page][key][sub_key][sub_sub_key] is a five-dimensional-array containing _all_ texts and actually the code looks like this:
It's Alderaan all over again
-
RE: Private global
The monostate pattern: http://www.objectmentor.com/resources/articles/SingletonAndMonostate.pdf
That said, I think more context is needed: how is the class & its members used?
-
RE: Overheard in a cubicle farm
@RogerWilco said:
Unless you mean the word "hardcoded" refering to something stored in a database? I would not consider something in a database "hardcoded" usually
Ting
@RogerWilco said:
This can be a WTF, but then you need to provide
information why.More after a chuckle than a WTF
-
Overheard in a cubicle farm
"We've hardcoded the IP address in the database."
-
General office WTF-ery
Not quite a curious perversion in information technology, but there was a "WTF" involved.
Onsite at a client, being subjected to office white noise [MP3 player is in the car. At my wife's office], when I overhear, post-telephonic conversation with said hair washer, sans irony (or my detector's off) from a nearby cubicle:
"The hair washer at my hairdresser's remembered my name. Fantastic!"
-
Sign outside South African school
First aliens, now zombies. Will the prejudice never end?
-
Well, because we won't be here
Found in a UK based comparison website's code:
[code] _registrationLookup.Add(2008, "57,08,58");
_registrationLookup.Add(2009, "58,09,59");
/*
* We can to the conclusion on 30/08/2007 that we
* couldn't be bothered extending this to 2010, since were
* probably not going to be here then... Enjoy!
*/ [/code]