The "not so" good old days... :)
chmod2222
Posts
-
This code may not quite do what it says it does. -
This code may not quite do what it says it does.Well, when I write code, I write it so it doesn't have to be debugged(almost:). Only thing that can go wrong here, would be that the database connection is down, or some sore of foreign key exception. It would result in an exception(with a nice description), but that's a whole different story. My point is, that I would always rather write(and debug) 2 lines of code, than 22, no mather how complicated they may be...but that's just me...
-
This code may not quite do what it says it does.Not really.. You get null, or the result you wanted, nothing to debug.
-
This code may not quite do what it says it does.Why don't you just do...
private bool HasApplicationAlready(int appTypeID, int registrationNumber, ref Application app)
{
app = Application().GetApplicationListForContact(DataLocation.OnlineDataBase, Int32.Parse(Profile.RegistrationNumber)).OrderByDescending(s=>s.ApplicationId).FirstOrDefault(s=>s.Application_type_id==appTypeID);
return app==null?false:true;
}... or something similar?
-
Formwhat?Jeff Dickey wrote:
it violates the Thirty Second Rule (a single line of code shouldn't take that long to parse in your head)
Ummmm List tablica = dc.vArtiklCjeniks.Where(sg => sg.StrankaID == s.StrankaID || (sg.StrankaID == null && dc.vArtiklCjeniks.Where(sg1 => sg1.ArtiklID == sg.ArtiklID && sg1.StrankaID == s.StrankaID).Count() == 0)).ToList(); How about that? :D Does this qualify as coding horror? :)
-
Trimming off a little too much?PIEBALDconsult wrote:
Probably didn't realize he could do ddl_Operator.DataTextField = ("description").ToString() ;
or maybe.. ddl_Operator.DataTextField = ("description").ToString().ToString().ToString().ToString().Trim() ; :)
-
Do it only once pleaseI aint affraid to use it bubba joe :) I just don't see the need for it... At least in C#...
-
Do it only once pleaseI use goto only to break out of >1 nested loops... Don't see the need for it anywhere else...
-
Some impressions from New YorkI wanna go to NYC... or USA for that matter :)
-
no more Analog TVsHere in Croatia, most of our 4 :) channels, broadcast digital signal (as well as analog). The main ISP offered IPTV last year for the first time..hm.. or was it two years ago...and offcourse, ADSL is still not available for most of the country :(
modified on Friday, June 27, 2008 5:07 AM
-
MSDN Documentation - Love it? Hate it?So that that clip which haunted me in my dreams can return there, right? :mad: ;)
-
Can anyone recommend a PC game? [modified]I'd recommend Prey for single player as it has cool game features (it's a bit SF). For multi player I'd recommend Call of Duty 2 and and an application called "All seeing eye" for searching for multi player games...and if you didn't try it, multi player gaming rocks :D
-
I love VistaHeh my desktop is 1.5 GB ram index 3.1 :(... have to updgrade soon... love that Vista :)
-
I love VistaI was here since 3.11, and with every new wins I was happy. Took some time to adjust but all in all it's constantly improving. Love the colors, love the navigation, hate toolbars and no menus... C# - not a language, it's a way of life...