<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Samer Ibrahim's Blog : C#</title><link>http://weblogs.asp.net/sibrahim/archive/tags/C_2300_/default.aspx</link><description>Tags: C#</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Validator Control that will validate all Controls on a section of a Page</title><link>http://weblogs.asp.net/sibrahim/archive/2004/04/21/117918.aspx</link><pubDate>Thu, 22 Apr 2004 03:04:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:117918</guid><dc:creator>SamerEyeWarrior</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/sibrahim/rsscomments.aspx?PostID=117918</wfw:commentRss><comments>http://weblogs.asp.net/sibrahim/archive/2004/04/21/117918.aspx#comments</comments><description>&lt;P&gt;Ever find yourself creating an input form in ASP.NET that required a lot of Controls to be validated?&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Well, I have.&amp;nbsp; It's tedious.&amp;nbsp; You have to add at least one validator to each Control&amp;nbsp;you wanted validated.&amp;nbsp;&amp;nbsp;Apparently after discussing this with other people I've found that I'm not the only person who was wishing at the time that they could just add one Control that would validate all the Controls on the Page.&amp;nbsp; What's the solution?&amp;nbsp; To create a&amp;nbsp;Control&amp;nbsp;on your own to do just that and that's what I did.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Here's how you use it:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;You add the Control to your page (sorry no &amp;#8220;drag and drop&amp;#8221; stuff I&amp;nbsp;don't believe in drag and drop&amp;nbsp;so I didn't find the need to write that kind of code but be my guest).&amp;nbsp; You set&amp;nbsp;my Control's ControlToValidate property to&amp;nbsp;a server Control containing all Controls you want to validate, eg.&amp;nbsp;the DIV&amp;nbsp;containing&amp;nbsp;your&amp;nbsp;let's say&amp;nbsp;TextBox Controls.&amp;nbsp; That's it.&amp;nbsp; &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Magic huh?&amp;nbsp; Not really, here's how it works:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;My&amp;nbsp;Control gets&amp;nbsp;the ControlToValidate's Controls collection.&amp;nbsp; It goes through the Controls collection and checks for controls that can be validated [0]&amp;nbsp;and adds a validator control [1]&amp;nbsp;to the ControlToValidate's Controls collection [2] immediately following any control that can be validated.&lt;BR&gt;[0]&amp;nbsp; To check for Controls that can be validated it uses the BaseValidator's GetValidationProperty method.&amp;nbsp; Now my control doesn't inherit from BaseValidator so I have an internal class that does and exposes a function the just returns the value of BaseValidator.GetValidationProperty().&lt;BR&gt;[1]&amp;nbsp; The type of validator that is added is determined by you.&amp;nbsp; I really wrote an abstract class that you must inherit from and implement one method that returns a validator.&amp;nbsp; I've written the first one for you so you have an example.&amp;nbsp; It adds RequiredFieldValidators.&lt;BR&gt;[2]&amp;nbsp; Controls don't have access to manipulate each other's Controls collection so I had to kind of hack my way around this.&amp;nbsp; I used reflection to change&amp;nbsp;a private field in the ControlToValidate so that it would allow me to modify its collection.&amp;nbsp; Don't worry I change it back when I'm done :).&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;How do you get a hold of&amp;nbsp;my Control:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;You &lt;A href="http://amunra.us/files/ValidatorSoln.zip"&gt;download it&lt;/A&gt; from my perpetually under construction &lt;A href="http://www.sameriwarrior.com"&gt;homepage&lt;/A&gt;.&amp;nbsp; The code isn't elegant&amp;nbsp;or&amp;nbsp;well documented nor does it provide you with all the other nice things &lt;A href="http://weblogs.asp.net/asmith/"&gt;Andy Smith&lt;/A&gt;'s &lt;A href="http://www.metabuilders.com/"&gt;MetaBuilders&lt;/A&gt; website Controls&amp;nbsp;provide you with but it works.&amp;nbsp; Feel free to modify it as you will.&amp;nbsp; If you feel like you've modified it and created something of value all I ask is that you share it.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The one caveat is that my Control has to be before the ControlToValidate in the Page (or&amp;nbsp;user control, custom control, composite control, etc)'s&amp;nbsp;Controls collection.&amp;nbsp; The performance hit for using reflection was about 5% from my calculations on a Page with&amp;nbsp;three Controls to validate however my testing environment was bad so I decided to quit testing.&amp;nbsp; I really don't think&amp;nbsp;it will really affect your performance that much though.&amp;nbsp; Feel free to test it yourself and let me know the results.&lt;/P&gt;
&lt;P&gt;One last thing just in case USE AT YOUR OWN RISK.&amp;nbsp; Oh and I guess people always say don't redistribute so don't do that either (I don't quite know why but still).&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=117918" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/sibrahim/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/sibrahim/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/sibrahim/archive/tags/C_2300_/default.aspx">C#</category></item><item><title>Problem with System.Timers.Timer not firing in a Windows service?  Well switch to the System.Threading.Timer instead!!!</title><link>http://weblogs.asp.net/sibrahim/archive/2004/01/13/58429.aspx</link><pubDate>Wed, 14 Jan 2004 03:18:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:58429</guid><dc:creator>SamerEyeWarrior</dc:creator><slash:comments>8</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/sibrahim/rsscomments.aspx?PostID=58429</wfw:commentRss><comments>http://weblogs.asp.net/sibrahim/archive/2004/01/13/58429.aspx#comments</comments><description>&lt;FONT size=2&gt;
&lt;P&gt;Ok so since posting about a System.Timers.Timer problem that I had quite a while ago on several newsgroups/mailing lists,&amp;nbsp; I've received several emails asking about what the solution to the problem is/was so I decided it might be about time to let everyone in on it.&amp;nbsp; Below is the basic email I've been sending out in reply to those messages...&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;I highly recommend that you switch to the System.Threading.Timer instead. Please read this thread, it has a couple of parts [0][1][2], it will give you great insight as to why the problem is occurring. Best of luck and I hope that helps. Regards, Sam&lt;/P&gt;
&lt;P&gt;[1] &lt;/FONT&gt;&lt;A href="http://discuss.develop.com/archives/wa.exe?A2=ind0307A&amp;amp;L=DOTNET-CLR&amp;amp;D=0&amp;amp;I=-3&amp;amp;P=1118"&gt;&lt;U&gt;&lt;FONT color=#0000ff size=2&gt;http://discuss.develop.com/archives/wa.exe?A2=ind0307A&amp;amp;L=DOTNET-CLR&amp;amp;D=0&amp;amp;I=-3&amp;amp;P=1118&lt;/U&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;FONT size=2&gt;
&lt;P&gt;[1] &lt;/FONT&gt;&lt;A href="http://discuss.develop.com/archives/wa.exe?A2=ind0309D&amp;amp;L=DOTNET-CLR&amp;amp;P=R5347&amp;amp;I=-3"&gt;&lt;U&gt;&lt;FONT color=#0000ff size=2&gt;http://discuss.develop.com/archives/wa.exe?A2=ind0309D&amp;amp;L=DOTNET-CLR&amp;amp;P=R5347&amp;amp;I=-3&lt;/U&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;FONT size=2&gt;
&lt;P&gt;[2] &lt;/FONT&gt;&lt;A href="http://discuss.develop.com/archives/wa.exe?A2=ind0306D&amp;amp;L=DOTNET-CLR&amp;amp;P=R1007&amp;amp;D=0&amp;amp;I=-3"&gt;&lt;U&gt;&lt;FONT color=#0000ff size=2&gt;http://discuss.develop.com/archives/wa.exe?A2=ind0306D&amp;amp;L=DOTNET-CLR&amp;amp;P=R1007&amp;amp;D=0&amp;amp;I=-3&lt;/U&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=58429" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/sibrahim/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/sibrahim/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/sibrahim/archive/tags/Lists_2F00_Forums_2F00_etc_2E00_/default.aspx">Lists/Forums/etc.</category></item><item><title>Arrrays and Streams</title><link>http://weblogs.asp.net/sibrahim/archive/2003/09/17/27882.aspx</link><pubDate>Wed, 17 Sep 2003 04:17:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:27882</guid><dc:creator>SamerEyeWarrior</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/sibrahim/rsscomments.aspx?PostID=27882</wfw:commentRss><comments>http://weblogs.asp.net/sibrahim/archive/2003/09/17/27882.aspx#comments</comments><description>&lt;P&gt;During my time off from blogging, I was doing quite a bit of playing around with streams.&amp;nbsp; Stream this in here, stream this out there.&amp;nbsp; I noticed two odd things about Streams and arrays in .NET&lt;/P&gt;
&lt;P&gt;1.) There is no method in the Stream classes to copy the bytes of one Stream into another Stream, forcing me to do that work myself.&amp;nbsp; I don't quite understand why this is.&amp;nbsp; Some Streams have contructors that take another Stream in but not all do.&amp;nbsp; I can't be the only one who ever has to open one Stream and write it to another and yet not all Streams have a simple way to do this.&amp;nbsp; It seems like a relatively nature thing to do.&amp;nbsp; Oh well, it's easy enough to do on your own.&lt;/P&gt;
&lt;P&gt;2.) The other thing I noticed is far more peculiar.&amp;nbsp; While I was moving the bytes of one Stream into another I created a byte buffer to hold the content I was moving.&amp;nbsp; The code looked like this:&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;byte&lt;/FONT&gt;&lt;FONT size=2&gt;[] byteArray = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;byte&lt;/FONT&gt;&lt;FONT size=2&gt;[stream1.Length];&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;stream1.Read(byteArray, 0, byteArray.Length);&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So, what's so odd about this?&amp;nbsp; Well Stream.Length returns an Int64 and you can create arrays of length Int64 with no problem.&amp;nbsp; However, the Stream.Read method's signature looks like this: &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemiostreamclassreadtopic.asp"&gt;Read(byte[] buffer, Int32 offset, Int32 count )&lt;/A&gt;.&amp;nbsp; Notice however I'm passing the array's length which I initially set to an Int64 to a method that takes an Int32.&amp;nbsp; The compiler won't complain because Array.Length returns an Int32 which I found odd.&amp;nbsp; But there is more to this.&amp;nbsp; In version 1.1 of the framework, Arrays have a LongLength (&lt;A href="http://dotnetguy.techieswithcats.com/"&gt;Brad Wilson&lt;/A&gt; pointed&amp;nbsp;this out to me)&amp;nbsp;while this doesn't exist in version 1.0.&amp;nbsp; Looking at &lt;A href="http://www.saurik.com/net/exemplar/"&gt;Anakrino&lt;/A&gt;&amp;nbsp;I found out that in version 1.0, the code gets decompiled from the DLL as (note I slightly modified what you see below):&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT size=2&gt;stream1.Read(byteArray, 0, check((Int32)byteArray.Length));&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I'm not good at reading IL so I didn't look at it and I haven't yet looked at what code generated by 1.0 looks like.&lt;/P&gt;
&lt;P&gt;All this is&amp;nbsp;kind of cool and kind of&amp;nbsp;strange IMHO.&amp;nbsp;&amp;nbsp;I discovered part 2) as I was trying to restore code because I forgot to check a project into Visual Source Safe right before my harddrive died.&amp;nbsp; I had to restore it from the DLL using Exemplar.&amp;nbsp; I don't like VSS much but I like losing my code much, much less.&lt;/P&gt;
&lt;P&gt;PS&amp;nbsp; In my &lt;A href="http://weblogs.asp.net/sibrahim/posts/27103.aspx"&gt;last post&lt;/A&gt; I said I was going to be posting again soon and really I meant to.&amp;nbsp; However, as luck would have it, the cable wire outside of my house got yanked and it took them 3 days to get my connection back up.&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=27882" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/sibrahim/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/sibrahim/archive/tags/C_2300_/default.aspx">C#</category></item><item><title>Don't Get Bitten by Integer Division</title><link>http://weblogs.asp.net/sibrahim/archive/2003/04/18/5846.aspx</link><pubDate>Fri, 18 Apr 2003 20:46:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5846</guid><dc:creator>SamerEyeWarrior</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/sibrahim/rsscomments.aspx?PostID=5846</wfw:commentRss><comments>http://weblogs.asp.net/sibrahim/archive/2003/04/18/5846.aspx#comments</comments><description>&lt;P&gt;My first story which is entitled &lt;A href="http://dotnetweblogs.com/SIbrahim/Story/5843.aspx"&gt;"Don't Get Bitten by Integer Division"&lt;/A&gt;&amp;nbsp;is now up.&lt;/P&gt;
&lt;P&gt;It's about integer division in the CLR and how to avoid unexpected results.&amp;nbsp; I didn't want to make it a regular&amp;nbsp;post because of it's length (a bit of code goes a long way).&amp;nbsp; Please take the time out and read it if you are interested.&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5846" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/sibrahim/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/sibrahim/archive/tags/C_2300_/default.aspx">C#</category></item><item><title>Cool blog entry from Craig Andera</title><link>http://weblogs.asp.net/sibrahim/archive/2003/04/04/4809.aspx</link><pubDate>Fri, 04 Apr 2003 04:01:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:4809</guid><dc:creator>SamerEyeWarrior</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/sibrahim/rsscomments.aspx?PostID=4809</wfw:commentRss><comments>http://weblogs.asp.net/sibrahim/archive/2003/04/04/4809.aspx#comments</comments><description>&lt;P&gt;[&lt;A href="http://staff.develop.com/candera/weblog"&gt;Craig Andera&lt;/A&gt;]&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;DIV class=itemTitle&gt;&lt;B&gt;
&lt;P&gt;&lt;EM&gt;&lt;A href="http://staff.develop.com/candera/weblog/2003/04/03.html#a79"&gt;Building an Array&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/B&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;EM&gt;A question that comes up occasionally on the mailing lists revolves around how to manipulate arrays of things. The problem is that once created, arrays can't change size. But what if you don't necessarily know how big it'll be right off the bat. Here's my favorite way to deal with arrays. &lt;/EM&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;EM&gt;ArrayList al = new ArrayList();&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;EM&gt;for (loop over some set of things)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;EM&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;EM&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;al.Add(thing);&lt;o:p&gt;&lt;/o:p&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;EM&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;EM&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;EM&gt;Thing[] things = &lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;EM&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp; (Thing[]) &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;al.ToArray(typeof(Thing));&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;In other words, System.ArrayList is a convenient way to keep track of a list of things that you can later turn into an array. &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Even better is the fact that you can construct an ArrayList from any array, like so: &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier, Monospace"&gt;&lt;EM&gt;ArrayList list = new ArrayList(things); &lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;And you can remove a particular item like this: &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier, Monospace"&gt;&lt;EM&gt;list.Remove(particularThing); &lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Times New Roman,Times,Serif"&gt;&lt;EM&gt;Combine these three things, and you have a convenient way to remove an item from a list: turn the array into an ArrayList, remove the item you care about, then turn it back into an array. Or use Add instead of Remove, and you've got a convenient way to append things. &lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P dir=ltr&gt;For those who've never used the ArrayList for this purpose, you will be amazed at the convenience of this.&amp;nbsp; I use this technique all time.&amp;nbsp; One case where I especially like it is where I have a class&amp;nbsp;for which&amp;nbsp;I don't want to go through creating a type safe collection.&amp;nbsp; I just use this technique to return an array of the type of the class back from the&amp;nbsp;method where I use the ArrayList internally.&amp;nbsp; Obviously, you lose the benefit of checking at compile time type safety.&amp;nbsp; However, for an internal function where I know what I'm getting myself into,&amp;nbsp;using&amp;nbsp;this technique&amp;nbsp;well worth it to me.&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=4809" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/sibrahim/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/sibrahim/archive/tags/C_2300_/default.aspx">C#</category></item><item><title>C# Future Features</title><link>http://weblogs.asp.net/sibrahim/archive/2003/02/23/2809.aspx</link><pubDate>Sun, 23 Feb 2003 16:09:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:2809</guid><dc:creator>SamerEyeWarrior</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/sibrahim/rsscomments.aspx?PostID=2809</wfw:commentRss><comments>http://weblogs.asp.net/sibrahim/archive/2003/02/23/2809.aspx#comments</comments><description>&lt;DIV class=itemTitle&gt;
&lt;P&gt;&lt;EM&gt;Generics, partial types, anonymous functions, and iterators - all planned for a future version of C#. This link discusses what these features are and how they might look. &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;[&lt;/EM&gt;&lt;A href="http://staff.develop.com/candera/weblog/2003/02/23.html#a37"&gt;&lt;EM&gt;Craig Andera&lt;/EM&gt;&lt;/A&gt;&lt;EM&gt;]&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Cool!&lt;/P&gt;&lt;/DIV&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=2809" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/sibrahim/archive/tags/C_2300_/default.aspx">C#</category></item><item><title>Programming Microsoft Word 2002 and Excel 2002 with Microsoft Visual C#</title><link>http://weblogs.asp.net/sibrahim/archive/2003/02/12/2348.aspx</link><pubDate>Thu, 13 Feb 2003 02:40:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:2348</guid><dc:creator>SamerEyeWarrior</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/sibrahim/rsscomments.aspx?PostID=2348</wfw:commentRss><comments>http://weblogs.asp.net/sibrahim/archive/2003/02/12/2348.aspx#comments</comments><description>&lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=b1c30b0c-d2f3-48bb-8e76-7c8892b5ed95&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=b1c30b0c-d2f3-48bb-8e76-7c8892b5ed95&amp;amp;displaylang=en&lt;/A&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=2348" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/sibrahim/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/sibrahim/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/sibrahim/archive/tags/Miscellaneous/default.aspx">Miscellaneous</category></item><item><title>WOW my first blog.... Thanks Scott!!!</title><link>http://weblogs.asp.net/sibrahim/archive/2003/02/04/368.aspx</link><pubDate>Wed, 05 Feb 2003 00:44:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:368</guid><dc:creator>SamerEyeWarrior</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/sibrahim/rsscomments.aspx?PostID=368</wfw:commentRss><comments>http://weblogs.asp.net/sibrahim/archive/2003/02/04/368.aspx#comments</comments><description>&lt;P&gt;Thanks to &lt;A href="http://aspnetweblog.com/"&gt;Scott Watermasysk&lt;/A&gt;&amp;nbsp; I now have my first blog.&amp;nbsp; First thing I'd like to say is that Scott has been extremely responsive thus far and I greatly appreciate him giving this room to write about .NET from my perspective, all simply from the kindness of his heart no less.&amp;nbsp; Scott is preforming a great service to the .NET community and has pulled in some greats over from the Radio world to the &lt;A href="http://dotnetweblogs.com/"&gt;DotNetWebLogs &lt;/A&gt;world.&amp;nbsp; Please read them.&lt;/P&gt;
&lt;P&gt;Next,&amp;nbsp;since most of you have no idea who in the world I am, I'd like to start on a personal note before just rambling on about .NET and everything else that goes on in the mind of a professional programmer.&amp;nbsp; I'm a programmer/analyst for &lt;A href="http://www.bernstein.com/"&gt;Sanford C. Bernstein&lt;/A&gt; a subsidiary of &lt;A href="http://www.alliancecapital.com/"&gt;Alliance Capital Management&lt;/A&gt;.&amp;nbsp; I graduated &lt;A href="http://www.rutgers.edu/"&gt;Rutgers College&lt;/A&gt; with a double major in Computer Science and Molecular Biology and Biochemistry in June 2001.&amp;nbsp; I'd mainly worked with Java on Unix during my educational career but moved over to the Microsoft domain when I started working.&amp;nbsp; I have been working with .NET since it's final release, no Beta work.&amp;nbsp; Currently, I'm part of our department's team which is leading the push to .NET.&amp;nbsp; .NET has proven to be both fun and challenging to me and C# has been a very welcome replacement to VB6.&amp;nbsp; I attended the &lt;A href="http://www.develop.com/"&gt;DevelopMentor&lt;/A&gt; Guerrilla .NET class and have been doing my best to keep up with the ever changing world of technology by reading several lists, forums, newsletters, blogs, books, and magazines on a daily basis.&amp;nbsp; I have a relatively firm understanding of .NET and C# but I'm no where along the lines of many but hopefully one day I'll get there and I hope this Blog assists me.&lt;/P&gt;
&lt;P&gt;Lastly, I'd like to give you an idea of what my intentions are for this blog.&amp;nbsp; The plan is to keep most of my posts .NET related in some way shape or form.&amp;nbsp; You will most likely, however, have to excuse some off topic rants.&amp;nbsp; I hope to post useful tid bits, articles, expression of joy&amp;nbsp;from using .NET, frustration from .NET, and topics that I hope you will join in on by posting comments.&amp;nbsp; I've learned that to be a great programmer a lot of experience must be gained.&amp;nbsp; Since I've been in the industry for less than 2 years I have much to learn but I believe this blog will be a great bridge between those just&amp;nbsp;beginning to learn&amp;nbsp;.NET's expansive framework and those who have earned MVP in .NET and are speakers and instructors.&lt;/P&gt;
&lt;P&gt;I will do my best to post &lt;EM&gt;at least&lt;/EM&gt; one item per day so please do&amp;nbsp;frequent my blog.&amp;nbsp; Feel free to contact me anytime and thanks for reading my blog!&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=368" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/sibrahim/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/sibrahim/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/sibrahim/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/sibrahim/archive/tags/Stuff+about+me/default.aspx">Stuff about me</category><category domain="http://weblogs.asp.net/sibrahim/archive/tags/Miscellaneous/default.aspx">Miscellaneous</category></item></channel></rss>