Blog Stats
  • Posts - 99
  • Articles - 5
  • Comments - 236
  • Trackbacks - 105

 

December 2005 Entries

Why I don't use thread.abort

Thread.Abort can cause some nasty nasty behaviors as it forces an exception where one was not originally intending to be handled. This can wreak havoc when dealing with un-managed resources. I have for your viewing pleasure an example directly from the 1.1 framework! This particular bit of code is from FileStream's constructor! If thread aborts happen at correct times the file stays locked until the process is restarted without any hope of being recoverred. The time that this can occur is specifically...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Feedback broken so ...

I am putting this here since feedback seems to be broken at this point. this is in reference to .. http://geekswithblogs.net/r... I am not quite sure what you are on about ... the value of J is neither 5 nor 6 it is 1. ArrayList sets = new ArrayList(); Creates a new array list sets.Add(single); Adds the previous arraylist into this arraylist i.e. sets[1] = the arraylist ArrayList temp = (ArrayList) sets[0]; temp.RemoveAt(0);//removes the item from the first arraylist...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

New Article

http://geekswithblogs.net/g... “Holiday Thoughts” from EE newsletter
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Highlight DataGrid Row

or anything for that matter. I was just reading this post http://geekswithblogs.net/d... There are 2 major problems with the solution presented. 1) it requires a recompile to change the colors 2) this should really be in a style sheet Thus I present ... the style sheet implementation just set the datagridrow to be the right class. in your css .DataGridRow{ background-color: black; border: 0px; behavior: url(/styles/rollover.htc); } in a .htc file <PUBLIC:COMPONENT>...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

New stuff in 2.0

Largest design changing feature in 2.0 outside of generics. public class Foo { private int m_Bar; public int Bar { get { return m_Bar; } internal set { m_Bar = value; } } I have been wanting to do this for oh so long. :D
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

hmm this could have some intresting uses

Someone today asked me a question which I found intresting and is fairly usefull in debugging. The questions was “How do I figure out which function called my function”. In other words they wanted to note their caller without throwing an exception etc. This is quite easily done by using the StackFrame object in System.Diagnostics just promise you won’t use this in lieu of encapsulation J i.e. NEVER use this as a conditional in your code if(IamCalledBySomeFunction) { //do one behavior...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Partial Classes Ctd

I generally avoid writing multiple posts in a day in any blog system as it aggregates but ... A few days ago I made a post about partial classes being misused and the fact that they are not new and a few people came back at me discussing their use for hiding autogenerated code. I understand that this is their primary use but I challenge the thought that they are needed, does inheritance not provide the exact same end. There may be a slight amount of higher overhead using inheritance at a level far...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Feedback & Exception Management

Is feedback broken? I have been trying to leave feedback for a few people but it has been failing. I have requested a new sourceforge space which should be available by the end of the week. I will be placing my exception management library up, I will place a link there. You are probably thinking to yourself “Wait isn't there a MS application block for that?”. Well I found the application block a small step above useless for my applications as it is fairly difficult to manage and the configuration...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

 

 

Copyright © Greg Young