<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sam Beauvois</title>
	<atom:link href="http://www.sambeauvois.be/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sambeauvois.be/blog</link>
	<description>general dev, .net and other stuff</description>
	<lastBuildDate>Tue, 31 Jan 2012 13:38:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Dynamic is magic : A solution to use the ASP.NET profile in web applications.</title>
		<link>http://www.sambeauvois.be/blog/2012/01/dynamic-is-magic-a-solution-to-use-the-asp-net-profile-in-web-applications/</link>
		<comments>http://www.sambeauvois.be/blog/2012/01/dynamic-is-magic-a-solution-to-use-the-asp-net-profile-in-web-applications/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 13:38:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://www.sambeauvois.be/blog/?p=926</guid>
		<description><![CDATA[Profiles are not auto generated with Web Applications, so you can’t just add them in the web.config and use them directly. (unless …) The WebSite project do a magic thing : when you add properties to the profile in the web.config file, a class is autogenerated and allow the developer to access these properties. The [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Profiles are not auto generated with Web Applications, so you can’t just add them in the web.config and use them directly. (unless …)</p></blockquote>
<p>The WebSite project do a magic thing : when you add properties to the profile in the web.config file, a class is autogenerated and allow the developer to access these properties. The web application project don&#8217;t do that.</p>
<p>You can find some workarounds over the web, here is some</p>
<ul>
<li><a href="http://weblogs.asp.net/joewrobel/archive/2008/02/03/web-profile-builder-for-web-application-projects.aspx" target="_blank">http://weblogs.asp.net/joewrobel/archive/2008/02/03/web-profile-builder-for-web-application-projects.aspx</a></li>
<li><a href="http://leedumond.com/blog/asp-net-profiles-in-web-application-projects/" target="_blank">http://leedumond.com/blog/asp-net-profiles-in-web-application-projects/</a></li>
<li><a href="http://willmtz.blogspot.com/2011/09/using-aspnet-profile-feature-in-web.html" target="_blank">http://willmtz.blogspot.com/2011/09/using-aspnet-profile-feature-in-web.html</a></li>
<li><a href="http://stackoverflow.com/questions/426609/how-to-assign-profile-values" target="_blank">http://stackoverflow.com/questions/426609/how-to-assign-profile-values</a></li>
</ul>
<p>The &#8220;<a href="http://msdn.microsoft.com/en-us/library/dd264741.aspx" target="_blank">dynamic</a>&#8221; keyword help us here.</p>
<p>So, no more chit chat, here is the code snippets for a profile with 3 parameters : LastName, FirstName and GSM</p>
<p>web.config:</p>
<pre class="brush: xml; title: ;">

&lt;profile enabled=&quot;true&quot;&gt;
 &lt;providers&gt;
 &lt;clear/&gt;
 &lt;add name=&quot;AspNetSqlProfileProvider&quot; type=&quot;System.Web.Profile.SqlProfileProvider&quot; connectionStringName=&quot;ApplicationServices&quot; applicationName=&quot;MyApp&quot;/&gt;
 &lt;/providers&gt;
 &lt;properties&gt;
 &lt;add name=&quot;FirstName&quot; type=&quot;string&quot;/&gt;
 &lt;add name=&quot;LastName&quot; type=&quot;string&quot;/&gt;
 &lt;add name=&quot;GSM&quot; type=&quot;string&quot;/&gt;
 &lt;/properties&gt;
 &lt;/profile&gt;
</pre>
<p>A &#8220;business&#8221; class, I called it &#8220;ProfilePresenter&#8221;, it returns the profile of the logged user and allow modifications:</p>
<pre class="brush: csharp; title: ;">

public class ProfilePresenter
{
 public dynamic GetProfile()
 {
 return HttpContext.Current.Profile;
 }
 public dynamic UpdateProfile(string FirstName, string LastName, string GSM)
 {
 HttpContext.Current.Profile.SetPropertyValue(&quot;FirstName&quot;, FirstName);
 HttpContext.Current.Profile.SetPropertyValue(&quot;LastName&quot;, LastName);
 HttpContext.Current.Profile.SetPropertyValue(&quot;GSM&quot;, GSM);
 HttpContext.Current.Profile.Save();
 return HttpContext.Current.Profile;
 }
}
</pre>
<p>A page that uses the ProfilePresenter class : displaying the profile properties, and edit them</p>
<p>ObjectDataSource:</p>
<pre class="brush: csharp; title: ;">

&lt;asp:ObjectDataSource runat=&quot;server&quot; ID=&quot;ProfileODS&quot; TypeName=&quot;Board.Presenters.ProfilePresenter&quot;
 SelectMethod=&quot;GetProfile&quot; UpdateMethod=&quot;UpdateProfile&quot;/&gt;
&lt;pre&gt;</pre>
<p>FormView: Display part</p>
<pre class="brush: csharp; title: ;">
 &lt;asp:FormView runat=&quot;server&quot; ID=&quot;ProfileFV&quot; DataSourceID=&quot;ProfileODS&quot; RenderOuterTable=&quot;false&quot;&gt;
 &lt;EmptyDataTemplate&gt;
 &lt;p&gt;
 No profil datas
 &lt;/p&gt;
 &lt;/EmptyDataTemplate&gt;
 &lt;ItemTemplate&gt;
 &lt;h2&gt;
 Profil informations&lt;/h2&gt;
 &lt;div&gt;
 &lt;asp:Button runat=&quot;server&quot; ID=&quot;Edit&quot; CommandName=&quot;Edit&quot; Text=&quot;Edit&quot; /&gt;&lt;/div&gt;
 &lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th colspan=&quot;2&quot;&gt;
 Infos
 &lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;th&gt;
 LastName
 &lt;/th&gt;
 &lt;td&gt;
 &lt;%# Eval(&quot;LastName&quot;)%&gt;
 &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;th&gt;
 FirstName
 &lt;/th&gt;
 &lt;td&gt;
 &lt;%# Eval(&quot;FirstName&quot;)%&gt;
 &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;th&gt;
 GSM
 &lt;/th&gt;
 &lt;td&gt;
 &lt;%# Eval(&quot;GSM&quot;)%&gt;
 &lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
 &lt;/table&gt;
 &lt;/ItemTemplate&gt;
</pre>
<p>FormView : the Edit part</p>
<pre class="brush: csharp; title: ;">
 &lt;EditItemTemplate&gt;
 &lt;h2&gt;
 Profil Update&lt;/h2&gt;
 &lt;div&gt;
 &lt;asp:Button runat=&quot;server&quot; ID=&quot;Edit&quot; CommandName=&quot;Cancel&quot; Text=&quot;Annuler&quot; /&gt;
 &lt;asp:Button runat=&quot;server&quot; ID=&quot;Button1&quot; CommandName=&quot;Update&quot; Text=&quot;Sauver&quot; /&gt;&lt;/div&gt;
 &lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th colspan=&quot;2&quot;&gt;
Infos
 &lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;th&gt;
 LastName
 &lt;/th&gt;
 &lt;td&gt;
 &lt;asp:TextBox runat=&quot;server&quot; ID=&quot;LastName&quot; Text='&lt;%# Bind(&quot;LastName&quot;)%&gt;' /&gt;
 &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;th&gt;
 FirstName
 &lt;/th&gt;
 &lt;td&gt;
 &lt;asp:TextBox runat=&quot;server&quot; ID=&quot;FirstName&quot; Text='&lt;%# Bind(&quot;FirstName&quot;)%&gt;' /&gt;
 &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;th&gt;
 GSM
 &lt;/th&gt;
 &lt;td&gt;
 &lt;asp:TextBox runat=&quot;server&quot; ID=&quot;GSM&quot; Text='&lt;%# Bind(&quot;GSM&quot;)%&gt;' /&gt;
 &lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
 &lt;/table&gt;
 &lt;/EditItemTemplate&gt;
 &lt;/asp:FormView&gt;
</pre>
<p>A simple use :</p>
<pre class="brush: csharp; title: ;">

dynamic profil = HttpContext.Current.Profile;
if (profil != null)
{
 Console.Writeline(profil.GSM);
}
</pre>
<p>Another example : retrieve the gsm numbers from  members of a security role. It shows how to retrieve the profile of an other user</p>
<pre class="brush: csharp; title: ;">

string[] users = Roles.GetUsersInRole(role);

List&lt;string&gt; gsm = new List&lt;string&gt;();
foreach (string user in users)
{
 dynamic profil = HttpContext.Current.Profile;
 dynamic profi = profil.GetProfile(user);
 if (profi != null)
 {
 if (!string.IsNullOrEmpty(profi.GSM))
 {
 gsm.Add(profi.GSM);
 }
 }
}
</pre>
<p>Let me know what you think !</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sambeauvois.be/blog/2012/01/dynamic-is-magic-a-solution-to-use-the-asp-net-profile-in-web-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Different Ways to Transfer Data between pages by Peter Bromberg</title>
		<link>http://www.sambeauvois.be/blog/2011/12/different-ways-to-transfer-data-between-pages-by-peter-bromberg/</link>
		<comments>http://www.sambeauvois.be/blog/2011/12/different-ways-to-transfer-data-between-pages-by-peter-bromberg/#comments</comments>
		<pubDate>Fri, 30 Dec 2011 08:46:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://www.sambeauvois.be/blog/?p=922</guid>
		<description><![CDATA[It&#8217;s a common question when working with asp.net, and Peter Bromberg has done a nice job by grouping eight methods to do it! Read his article here : http://www.eggheadcafe.com/tutorials/asp-net/e653f028-01fb-4d0e-843b-058deae562a2/eight-different-ways-to-transfer-data-from-one-page-to-another-page.aspx]]></description>
			<content:encoded><![CDATA[<blockquote><p>It&#8217;s a common question when working with asp.net, and Peter Bromberg has done a nice job by grouping eight methods to do it!</p></blockquote>
<p>Read his article here :<a href="http://www.eggheadcafe.com/tutorials/asp-net/e653f028-01fb-4d0e-843b-058deae562a2/eight-different-ways-to-transfer-data-from-one-page-to-another-page.aspx" target="_blank"> http://www.eggheadcafe.com/tutorials/asp-net/e653f028-01fb-4d0e-843b-058deae562a2/eight-different-ways-to-transfer-data-from-one-page-to-another-page.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sambeauvois.be/blog/2011/12/different-ways-to-transfer-data-between-pages-by-peter-bromberg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bring a bit of the Subsonic power to Entity Framework by adding automatic audit and logical delete fields</title>
		<link>http://www.sambeauvois.be/blog/2011/11/bring-a-bit-of-the-subsonic-power-to-entity-framework-by-adding-automatic-audit-and-logical-delete-fields/</link>
		<comments>http://www.sambeauvois.be/blog/2011/11/bring-a-bit-of-the-subsonic-power-to-entity-framework-by-adding-automatic-audit-and-logical-delete-fields/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 16:04:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ADO.NET]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[SubSonic]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.sambeauvois.be/blog/?p=915</guid>
		<description><![CDATA[Here is the code to do the same thing than in my previous article &#8220;Bring a bit of the Subsonic power to Linq to sql by adding automatic audit and logical delete fields&#8221; namespace YouNamespace.DAL { using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Data; using System.Data.Common; using System.Data.Objects; using System.Linq; public partial class [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the code to do the same thing than in my previous article <a href="http://www.sambeauvois.be/blog/2010/09/bring-a-bit-of-the-subsonic-power-to-linq-to-sql-by-adding-automatic-audit-and-logical-delete-fields/" target="_blank">&#8220;Bring a bit of the Subsonic power to Linq to sql by adding automatic audit and logical delete fields&#8221;</a></p>
<pre class="brush: csharp; title: ;">

namespace YouNamespace.DAL
{
 using System;
 using System.Collections;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
 using System.Data;
 using System.Data.Common;
 using System.Data.Objects;
 using System.Linq;

 public partial class YOURCONTEXTEntities
 {
 /// &lt;summary&gt;
 /// System fields for automatic audit and logical delete
 /// &lt;/summary&gt;
 private struct SystemFields
 {
 public const string CreatedOn = &quot;CREATEDON&quot;;
 public const string ModifiedOn = &quot;MODIFIEDON&quot;;
 public const string CreatedBy = &quot;CREATEDBY&quot;;
 public const string ModifiedBy = &quot;MODIFIEDBY&quot;;
 public const string IsDeleted = &quot;ISDELETED&quot;;
 }

 /// &lt;summary&gt;
 /// Overriding the SaveChanges method to automaticaly set system fields if any.
 /// &lt;/summary&gt;
 /// &lt;param name=&quot;options&quot;&gt;&lt;/param&gt;
 /// &lt;returns&gt;&lt;/returns&gt;
 public override int SaveChanges(System.Data.Objects.SaveOptions options)
 {
 IEnumerable&lt;ObjectStateEntry&gt; newEntries = this.ObjectStateManager.GetObjectStateEntries(EntityState.Added);

 foreach (ObjectStateEntry entry in newEntries)
 {
 ReadOnlyCollection&lt;FieldMetadata&gt; fieldsMetaData = entry.CurrentValues
 .DataRecordInfo.FieldMetadata;

 FieldMetadata createdOnField = fieldsMetaData
 .Where(f =&gt; string.Equals(f.FieldType.Name, SystemFields.CreatedOn, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();

 if (createdOnField.FieldType != null)
 {
 entry.CurrentValues.SetValue(createdOnField.Ordinal, DateTime.Now);
 }

 FieldMetadata createdByField = fieldsMetaData
 .Where(f =&gt; string.Equals(f.FieldType.Name, SystemFields.CreatedBy, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();

 if (createdByField.FieldType != null)
 {
 entry.CurrentValues.SetValue(createdByField.Ordinal, &quot;Sam&quot;);
 }

 FieldMetadata deletedField = fieldsMetaData
 .Where(f =&gt; string.Equals(f.FieldType.Name, SystemFields.IsDeleted, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();

 if (deletedField.FieldType != null)
 {
 entry.CurrentValues.SetValue(deletedField.Ordinal, false);
 }
 }

 IEnumerable&lt;ObjectStateEntry&gt; modifiedEntries = this.ObjectStateManager.GetObjectStateEntries(EntityState.Modified);
 foreach (ObjectStateEntry entry in modifiedEntries)
 {
 ReadOnlyCollection&lt;FieldMetadata&gt; fieldsMetaData = entry.CurrentValues
 .DataRecordInfo.FieldMetadata;

 FieldMetadata createdOnField = fieldsMetaData
 .Where(f =&gt; string.Equals(f.FieldType.Name, SystemFields.ModifiedOn, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();

 if (createdOnField.FieldType != null)
 {
 entry.CurrentValues.SetValue(createdOnField.Ordinal, DateTime.Now);
 }

 FieldMetadata createdByField = fieldsMetaData
 .Where(f =&gt; string.Equals(f.FieldType.Name, SystemFields.ModifiedBy, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();

 if (createdByField.FieldType != null)
 {
 entry.CurrentValues.SetValue(createdByField.Ordinal, &quot;Sam&quot;);
 }
 }

 IEnumerable&lt;ObjectStateEntry&gt; deletedEntries = this.ObjectStateManager.GetObjectStateEntries(EntityState.Deleted);
 foreach (ObjectStateEntry entry in deletedEntries)
 {
 // change from deleted to modified (!important)
 this.ObjectStateManager.ChangeObjectState(entry.Entity, EntityState.Modified);

 ReadOnlyCollection&lt;FieldMetadata&gt; fieldsMetaData = entry.CurrentValues
 .DataRecordInfo.FieldMetadata;

 FieldMetadata deletedField = fieldsMetaData
 .Where(f =&gt; string.Equals(f.FieldType.Name, SystemFields.IsDeleted, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();

 if (deletedField.FieldType != null)
 {
 entry.CurrentValues.SetValue(deletedField.Ordinal, true);
 }
else
 {
 // change back from modified to deleted (!important)
 this.ObjectStateManager.ChangeObjectState(entry.Entity, EntityState.Deleted);
 }
 }

 return base.SaveChanges(options);
 }
 }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sambeauvois.be/blog/2011/11/bring-a-bit-of-the-subsonic-power-to-entity-framework-by-adding-automatic-audit-and-logical-delete-fields/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Enum HasFlag method extension for &lt; 4.0 Framework</title>
		<link>http://www.sambeauvois.be/blog/2011/08/enum-hasflag-method-extension-for-4-0-framework/</link>
		<comments>http://www.sambeauvois.be/blog/2011/08/enum-hasflag-method-extension-for-4-0-framework/#comments</comments>
		<pubDate>Wed, 03 Aug 2011 19:52:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://www.sambeauvois.be/blog/?p=909</guid>
		<description><![CDATA[In the same idea than the previous article, here is an extension method to mimic the 4.0 HasFlag method (http://msdn.microsoft.com/en-us/library/system.enum.hasflag.aspx). /// &#60;summary&#62; /// Extentions for enums. /// &#60;/summary&#62; public static class EnumExtensions { /// &#60;summary&#62; /// A FX 3.5 way to mimic the FX4 &#34;HasFlag&#34; method. /// &#60;/summary&#62; /// &#60;param name=&#34;variable&#34;&#62;The tested enum.&#60;/param&#62; /// &#60;param [...]]]></description>
			<content:encoded><![CDATA[<p>In the same idea than the previous article, here is an extension method to mimic the 4.0 HasFlag method (<a href="http://msdn.microsoft.com/en-us/library/system.enum.hasflag.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/system.enum.hasflag.aspx</a>).</p>
<pre class="brush: csharp; title: ;">
     /// &lt;summary&gt;
    /// Extentions for enums.
    /// &lt;/summary&gt;
    public static class EnumExtensions
    {
        /// &lt;summary&gt;
        /// A FX 3.5 way to mimic the FX4 &quot;HasFlag&quot; method.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;variable&quot;&gt;The tested enum.&lt;/param&gt;
        /// &lt;param name=&quot;value&quot;&gt;The value to test.&lt;/param&gt;
        /// &lt;returns&gt;True if the flag is set. Otherwise false.&lt;/returns&gt;
        public static bool HasFlag(this Enum variable, Enum value)
        {
            // check if from the same type.
            if (variable.GetType() != value.GetType())
            {
                throw new ArgumentException(&quot;The checked flag is not from the same type as the checked variable.&quot;);
            }

            Convert.ToUInt64(value);
            ulong num = Convert.ToUInt64(value);
            ulong num2 = Convert.ToUInt64(variable);

            return (num2 &amp; num) == num;
        }
    }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sambeauvois.be/blog/2011/08/enum-hasflag-method-extension-for-4-0-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stream.CopyTo method for &lt; 4.0 framework</title>
		<link>http://www.sambeauvois.be/blog/2011/08/stream-copyto-method-for-4-0-framework/</link>
		<comments>http://www.sambeauvois.be/blog/2011/08/stream-copyto-method-for-4-0-framework/#comments</comments>
		<pubDate>Tue, 02 Aug 2011 18:47:19 +0000</pubDate>
		<dc:creator>Sam Beauvois</dc:creator>
				<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://www.sambeauvois.be/blog/?p=902</guid>
		<description><![CDATA[The .NET Framework 4.0 introduced the CopyTo() method for the Stream class. (http://msdn.microsoft.com/en-us/library/system.io.stream.copyto.aspx) You copy a stream into one other this way: MemoryStream memoryStream = new MemoryStream(); using (Stream stream = new FileStream(@&#34;c:\input.txt&#34;, FileMode.Open)) { stream.CopyTo(memoryStream); } If you are stucked with a lower version of the framework, you might want to use it anyway. [...]]]></description>
			<content:encoded><![CDATA[<p>The .NET Framework 4.0 introduced the CopyTo() method for the Stream class. (<a href="http://msdn.microsoft.com/en-us/library/system.io.stream.copyto.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/system.io.stream.copyto.aspx</a>)</p>
<p>You copy a stream into one other this way:</p>
<pre class="brush: csharp; title: ;">

   MemoryStream memoryStream = new MemoryStream();
   using (Stream stream = new FileStream(@&quot;c:\input.txt&quot;, FileMode.Open))
   {
      stream.CopyTo(memoryStream);
   }
</pre>
<p>If you are stucked with a lower version of the framework, you might want to use it anyway.</p>
<p>A bit of reflector is realy usefull to see how the implementation is done in 4.0.</p>
<p>The CopyTo method :</p>
<pre class="brush: csharp; title: ;">

public void CopyTo(Stream destination)
{
    if (destination == null)
    {
        throw new ArgumentNullException(&quot;destination&quot;);
    }
    if (!this.CanRead &amp;&amp; !this.CanWrite)
    {
        throw new ObjectDisposedException(null, Environment.GetResourceString(&quot;ObjectDisposed_StreamClosed&quot;));
    }
    if (!destination.CanRead &amp;&amp; !destination.CanWrite)
    {
        throw new ObjectDisposedException(&quot;destination&quot;, Environment.GetResourceString(&quot;ObjectDisposed_StreamClosed&quot;));
    }
    if (!this.CanRead)
    {
        throw new NotSupportedException(Environment.GetResourceString(&quot;NotSupported_UnreadableStream&quot;));
    }
    if (!destination.CanWrite)
    {
        throw new NotSupportedException(Environment.GetResourceString(&quot;NotSupported_UnwritableStream&quot;));
    }
    this.InternalCopyTo(destination, 0x1000);
}
</pre>
<p>We see that the InternalCopyTo is used :</p>
<pre class="brush: csharp; title: ;">

private void InternalCopyTo(Stream destination, int bufferSize)
{
    int num;
    byte[] buffer = new byte[bufferSize];
    while ((num = this.Read(buffer, 0, buffer.Length)) != 0)
    {
        destination.Write(buffer, 0, num);
    }
}
</pre>
<p>Remark :<br />
0&#215;1000 is in hexadecimal, which corresponds to 4096 in decimal.</p>
<p>So we can retrieve that for use with lower versions of the language</p>
<p>For .NET FX >= 3.0 you can create an extension method</p>
<pre class="brush: csharp; title: ;">

    using System;
    using System.IO;

    /// &lt;summary&gt;
    /// Extension methods for streams.
    /// &lt;/summary&gt;
    public static class StreamExtensions
    {
        /// &lt;summary&gt;
        /// Reads all the bytes from the current stream and writes them to the destination stream.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;original&quot;&gt;The current stream.&lt;/param&gt;
        /// &lt;param name=&quot;destination&quot;&gt;The stream that will contain the contents of the current stream.&lt;/param&gt;
        /// &lt;exception cref=&quot;System.ArgumentNullException&quot;&gt;Destination is null.&lt;/exception&gt;
        /// &lt;exception cref=&quot;System.NotSupportedException&quot;&gt;The current stream does not support reading.-or-destination does not support Writing.&lt;/exception&gt;
        /// &lt;exception cref=&quot;System.ObjectDisposedException&quot;&gt;Either the current stream or destination were closed before the System.IO.Stream.CopyTo(System.IO.Stream) method was called.&lt;/exception&gt;
        /// &lt;exception cref=&quot;System.IO.IOException&quot;&gt;An I/O error occurred.&lt;/exception&gt;
        public static void CopyTo(this Stream original, Stream destination)
        {
            if (destination == null)
            {
                throw new ArgumentNullException(&quot;destination&quot;);
            }
            if (!original.CanRead &amp;&amp; !original.CanWrite)
            {
                throw new ObjectDisposedException(&quot;ObjectDisposedException&quot;);
            }
            if (!destination.CanRead &amp;&amp; !destination.CanWrite)
            {
                throw new ObjectDisposedException(&quot;ObjectDisposedException&quot;);
            }
            if (!original.CanRead)
            {
                throw new NotSupportedException(&quot;NotSupportedException source&quot;);
            }
            if (!destination.CanWrite)
            {
                throw new NotSupportedException(&quot;NotSupportedException destination&quot;);
            }

            byte[] array = new byte[4096];
            int count;
            while ((count = original.Read(array, 0, array.Length)) != 0)
            {
                destination.Write(array, 0, count);
            }
        }
    }
</pre>
<p>You use it this way (same ways as the FX 4.0):</p>
<pre class="brush: csharp; title: ;">

   MemoryStream memoryStream = new MemoryStream();
   using (Stream stream = new FileStream(@&quot;c:\input.txt&quot;, FileMode.Open))
   {
      stream.CopyTo(memoryStream);
   }
</pre>
<p>For lower version, you can create an helper class.</p>
<pre class="brush: csharp; title: ;">

    using System;
    using System.IO;

    /// &lt;summary&gt;
    /// An helper class for streams.
    /// &lt;/summary&gt;
    public class StreamHelper
    {
        /// &lt;summary&gt;
        /// Reads all the bytes from the current stream and writes them to the destination stream.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;original&quot;&gt;The original stream.&lt;/param&gt;
        /// &lt;param name=&quot;destination&quot;&gt;The stream that will contain the contents of the current stream.&lt;/param&gt;
        /// &lt;exception cref=&quot;System.ArgumentNullException&quot;&gt;Destination is null.&lt;/exception&gt;
        /// &lt;exception cref=&quot;System.NotSupportedException&quot;&gt;The current stream does not support reading.-or-destination does not support Writing.&lt;/exception&gt;
        /// &lt;exception cref=&quot;System.ObjectDisposedException&quot;&gt;Either the current stream or destination were closed before the System.IO.Stream.CopyTo(System.IO.Stream) method was called.&lt;/exception&gt;
        /// &lt;exception cref=&quot;System.IO.IOException&quot;&gt;An I/O error occurred.&lt;/exception&gt;
        public static void CopyStreamTo(Stream original, Stream destination)
        {
            if (destination == null)
            {
                throw new ArgumentNullException(&quot;destination&quot;);
            }
            if (!original.CanRead &amp;&amp; !original.CanWrite)
            {
                throw new ObjectDisposedException(&quot;ObjectDisposedException&quot;);
            }
            if (!destination.CanRead &amp;&amp; !destination.CanWrite)
            {
                throw new ObjectDisposedException(&quot;ObjectDisposedException&quot;);
            }
            if (!original.CanRead)
            {
                throw new NotSupportedException(&quot;NotSupportedException source&quot;);
            }
            if (!destination.CanWrite)
            {
                throw new NotSupportedException(&quot;NotSupportedException destination&quot;);
            }

            byte[] array = new byte[4096];
            int count;
            while ((count = original.Read(array, 0, array.Length)) != 0)
            {
                destination.Write(array, 0, count);
            }
        }
    }
</pre>
<p>Use it this way:</p>
<pre class="brush: csharp; title: ;">

   MemoryStream memoryStream = new MemoryStream();
   using (Stream stream = new FileStream(@&quot;c:\input.txt&quot;, FileMode.Open))
   {
        StreamHelper.CopyStreamTo(stream, memoryStream);
   }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sambeauvois.be/blog/2011/08/stream-copyto-method-for-4-0-framework/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Chanel 9 &#124; Rx Workshop: Unified Programming Model</title>
		<link>http://www.sambeauvois.be/blog/2011/08/chanel-9-rx-workshop-unified-programming-model/</link>
		<comments>http://www.sambeauvois.be/blog/2011/08/chanel-9-rx-workshop-unified-programming-model/#comments</comments>
		<pubDate>Tue, 02 Aug 2011 14:46:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Quick posts]]></category>
		<category><![CDATA[Reminders]]></category>

		<guid isPermaLink="false">http://www.sambeauvois.be/blog/?p=912</guid>
		<description><![CDATA[Learn how to wrap existing event sources, including tasks, asynchronous methods, .NET events, etc. in observable sequences.]]></description>
			<content:encoded><![CDATA[<p><iframe style="height:288px;width:512px" src="http://channel9.msdn.com/Series/Rx-Workshop/Rx-Workshop-Unified-Programming-Model/player?w=512&#038;h=288" frameBorder="0" scrolling="no" ></iframe></p>
<p>Learn how to wrap existing event sources, including tasks, asynchronous methods, .NET events, etc. in observable sequences.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sambeauvois.be/blog/2011/08/chanel-9-rx-workshop-unified-programming-model/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET videos : Choosing the Right Programming Model</title>
		<link>http://www.sambeauvois.be/blog/2011/06/asp-net-videos-choosing-the-right-programming-model/</link>
		<comments>http://www.sambeauvois.be/blog/2011/06/asp-net-videos-choosing-the-right-programming-model/#comments</comments>
		<pubDate>Sun, 12 Jun 2011 20:34:09 +0000</pubDate>
		<dc:creator>Sam Beauvois</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://www.sambeauvois.be/blog/?p=897</guid>
		<description><![CDATA[As mentioned by Kris van der Mast on the asp.net forums, this video was on the get started page before, but don&#8217;t appears to be there anymore. This video is great to know in 5 minutes which model is good for you. So, because I don&#8217;t want to search for it, I post this video [...]]]></description>
			<content:encoded><![CDATA[<p>As mentioned by <a href="http://blog.krisvandermast.com/" target="_blank">Kris van der Mast</a> on the asp.net forums, this video was on the get started page before, but don&#8217;t appears to be there anymore.</p>
<p>This video is great to know in 5 minutes which model is good for you.</p>
<p>So, because I don&#8217;t want to search for it, I post this video here :</p>
<p><object style="width:400px;height:338px;" autoupdate="true" data="data:application/x-silverlight-2," type="application/x-silverlight-2"><param value="2.0.31005.0" name="MinRuntimeVersion"/><param name="source" value="http://www.asp.net/clientbin/mediaplayer/MSCommunities.MediaPlayer.xap" /><param value="videoid=24686" name="InitParams"/><a href="http://go2.microsoft.com/fwlink/?LinkID=114576&amp;v=2.0"><img style="border-width: 0px;" alt="Install Silverlight" src="http://i2.asp.net/common/static-asp/asp.net/videos/silverlight.mediaplayer/slplayer_disabled.png?cdn_id=04302010"/></a></object></p>
<p>(<a href="http://www.asp.net/general/videos/choosing-the-right-programming-model" target="_blank">direct link</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sambeauvois.be/blog/2011/06/asp-net-videos-choosing-the-right-programming-model/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One line how to&#8217;s : Save text in a file, or read text from a file.</title>
		<link>http://www.sambeauvois.be/blog/2011/06/one-line-how-tos-save-text-in-a-file-or-read-text-from-a-file/</link>
		<comments>http://www.sambeauvois.be/blog/2011/06/one-line-how-tos-save-text-in-a-file-or-read-text-from-a-file/#comments</comments>
		<pubDate>Sun, 12 Jun 2011 20:25:08 +0000</pubDate>
		<dc:creator>Sam Beauvois</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[HowTo]]></category>

		<guid isPermaLink="false">http://www.sambeauvois.be/blog/?p=733</guid>
		<description><![CDATA[Sometimes your solution lies in a single line. How to save a string in a text file System.IO.File.WriteAllText(&#34;c://yourfile.txt&#34;, &#34;here is the content of my file !&#34;); How to read a text file string content =  System.IO.File.ReadAllText(&#34;c://yourfile.txt&#34;); How does it work ? A bit or Reflector gives us : For the write method public static void [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Sometimes your solution lies in a single line.</p></blockquote>
<h4>How to save a string in a text file</h4>
<pre class="brush: csharp; light: true; title: ;">

System.IO.File.WriteAllText(&quot;c://yourfile.txt&quot;,
&quot;here is the content of my file !&quot;);
</pre>
<h4>How to read a text file</h4>
<pre class="brush: csharp; light: true; title: ;">

string content =  System.IO.File.ReadAllText(&quot;c://yourfile.txt&quot;);
</pre>
<h5>How does it work ?</h5>
<p>A bit or Reflector gives us :</p>
<p>For the write method</p>
<pre class="brush: csharp; title: ;">

public static void WriteAllText(string path, string contents)
{
if (path == null)
{
throw new ArgumentNullException(&quot;path&quot;);
}
if (path.Length == 0)
{
throw new ArgumentException(Environment.GetResourceString(&quot;Argument_EmptyPath&quot;));
}
InternalWriteAllText(path, contents, StreamWriter.UTF8NoBOM);
}
</pre>
<p>and the &#8220;InternalWriteAllText&#8221; method :</p>
<pre class="brush: csharp; title: ;">

private static void InternalWriteAllText(string path, string contents, Encoding encoding)
{
using (StreamWriter writer = new StreamWriter(path, false, encoding))
{
writer.Write(contents);
}
}
</pre>
<p>For the Read method :</p>
<pre class="brush: csharp; title: ;">
public static string ReadAllText(string path)
{
    if (path == null)
    {
        throw new ArgumentNullException(&quot;path&quot;);
    }
    if (path.Length == 0)
    {
        throw new ArgumentException(Environment.GetResourceString(&quot;Argument_EmptyPath&quot;));
    }
    return InternalReadAllText(path, Encoding.UTF8);
}
</pre>
<p>And the &#8220;InternalReadAllText&#8221; :</p>
<pre class="brush: csharp; title: ;">
private static string InternalReadAllText(string path, Encoding encoding)
{
    using (StreamReader reader = new StreamReader(path, encoding))
    {
        return reader.ReadToEnd();
    }
}
</pre>
<p>As you can see it don&#8217;t check if the file exists, so you have to check it by yourself :</p>
<pre class="brush: csharp; title: ;">

if (System.IO.File.Exists(&quot;your file path&quot;))
{
string content = System.IO.File.ReadAllText(&quot;your file path&quot;);
}
</pre>
<div id="_mcePaste" class="mcePaste" style="position: absolute; left: -10000px; top: 313px; width: 1px; height: 1px; overflow: hidden;"><span style="color: #1000a0;">public</span> <span style="color: #1000a0;">static</span> <a title="System.String" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:4.0.0.0:b77a5c561934e089/System.String">string</a> <strong><a class="bold" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:4.0.0.0:b77a5c561934e089/System.IO.File/ReadAllText%28String%29:String">ReadAllText</a></strong>(<a title="System.String" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:4.0.0.0:b77a5c561934e089/System.String">string</a> path) {     <span style="color: #1000a0;">if</span> (<a title="string path; // Parameter">path</a> == <span style="color: #800000;">null</span>)     {         <span style="color: #1000a0;">throw</span> <span style="color: #1000a0;">new</span> <a title="System.ArgumentNullException.ArgumentNullException(string paramName);" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:4.0.0.0:b77a5c561934e089/System.ArgumentNullException/.ctor%28String%29">ArgumentNullException</a>(<span style="color: #800000;">&#8220;path&#8221;</span>);     }     <span style="color: #1000a0;">if</span> (<a title="string path; // Parameter">path</a>.<a title="int System.String.Length { ... }" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:4.0.0.0:b77a5c561934e089/System.String/property:Length:Int32">Length</a> == <span style="color: #800000;">0</span>)     {         <span style="color: #1000a0;">throw</span> <span style="color: #1000a0;">new</span> <a title="System.ArgumentException.ArgumentException(string message);" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:4.0.0.0:b77a5c561934e089/System.ArgumentException/.ctor%28String%29">ArgumentException</a>(<a title="System.Environment" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:4.0.0.0:b77a5c561934e089/System.Environment">Environment</a>.<a title="string System.Environment.GetResourceString(string key);" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:4.0.0.0:b77a5c561934e089/System.Environment/GetResourceString%28String%29:String">GetResourceString</a>(<span style="color: #800000;">&#8220;Argument_EmptyPath&#8221;</span>));     }     <span style="color: #1000a0;">return</span> <a title="string System.IO.File.InternalReadAllText(string path, Encoding encoding);" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:4.0.0.0:b77a5c561934e089/System.IO.File/InternalReadAllText%28String,System.Text.Encoding%29:String">InternalReadAllText</a>(<a title="string path; // Parameter">path</a>, <a title="System.Text.Encoding" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:4.0.0.0:b77a5c561934e089/System.Text.Encoding">Encoding</a>.<a title="Encoding System.Text.Encoding.UTF8 { ... }" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:4.0.0.0:b77a5c561934e089/System.Text.Encoding/property:UTF8:System.Text.Encoding">UTF8</a>); }</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sambeauvois.be/blog/2011/06/one-line-how-tos-save-text-in-a-file-or-read-text-from-a-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 Cheatsheet</title>
		<link>http://www.sambeauvois.be/blog/2011/03/html5-cheatsheet/</link>
		<comments>http://www.sambeauvois.be/blog/2011/03/html5-cheatsheet/#comments</comments>
		<pubDate>Mon, 21 Mar 2011 11:13:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[Web design]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[WebSites]]></category>

		<guid isPermaLink="false">http://www.sambeauvois.be/blog/?p=881</guid>
		<description><![CDATA[Ultimate HTML5 Cheatsheat by Tech King Ultimate HTML5 Cheatsheat by Tech King]]></description>
			<content:encoded><![CDATA[<div style="text-align:center;">
<a href="http://www.testking.com/techking/infographics/ultimate-html5-cheatsheat/"  target="_blank">Ultimate HTML5 Cheatsheat</a> by <a href="http://www.testking.com/techking/">Tech King</a><br/><br/><br />
<a target="_blank" title="infographics" href="http://www.testking.com/techking/infographics/ultimate-html5-cheatsheat/"> <img src="http://www.testking.com/techking/wp-content/uploads/2011/02/IG-HTML5-Cheatsheet-600px.png" width="560px" alt="ultimate html5 cheatsheet"></a><br/></p>
<p><a href="http://www.testking.com/techking/infographics/ultimate-html5-cheatsheat/"  target="_blank">Ultimate HTML5 Cheatsheat</a> by <a href="http://www.testking.com/techking/">Tech King</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sambeauvois.be/blog/2011/03/html5-cheatsheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>6+ sources of videocasts</title>
		<link>http://www.sambeauvois.be/blog/2011/03/6-sources-of-videocasts/</link>
		<comments>http://www.sambeauvois.be/blog/2011/03/6-sources-of-videocasts/#comments</comments>
		<pubDate>Thu, 03 Mar 2011 11:52:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://www.sambeauvois.be/blog/?p=868</guid>
		<description><![CDATA[Here is a list of sites where you can find videos to form youself and learn a bit of new things]]></description>
			<content:encoded><![CDATA[<p>Here is a list of sites where you can find videos to form youself and learn a bit of new things</p>

<!-- Beginning of Link Library Output -->

<div id='linklist8' class='linklist'>
<div class="">
	<table class='linklisttable'>
<p style='display:table;width:100%;'><a href="http://channel9.msdn.com/" id="162" class="track_this_link"  title="Channel 9 keeps you up to date with videos from people behind the scenes building products at Microsoft." target="_blank"><img src="http://open.thumbshots.org/image.aspx?url=http://channel9.msdn.com/" alt="Chanel 9" title="Channel 9 keeps you up to date with videos from people behind the scenes building products at Microsoft." class="alignleft" /></a> <a href="http://channel9.msdn.com/" id="162" class="track_this_link"  title="Channel 9 keeps you up to date with videos from people behind the scenes building products at Microsoft." target="_blank">Chanel 9</a>
<br/>Channel 9 keeps you up to date with videos from people behind the scenes building products at Microsoft.</p><br/>
<p style='display:table;width:100%;'><a href="http://channel9.msdn.com/Browse/Shows" id="166" class="track_this_link"  title="Different shows on Chanel 9" target="_blank"><img src="http://open.thumbshots.org/image.aspx?url=http://channel9.msdn.com/Browse/Shows" alt="Chanel 9 Shows !" title="Different shows on Chanel 9" class="alignleft" /></a> <a href="http://channel9.msdn.com/Browse/Shows" id="166" class="track_this_link"  title="Different shows on Chanel 9" target="_blank">Chanel 9 Shows !</a>
<br/>Different shows on Chanel 9</p><br/>
<p style='display:table;width:100%;'><a href="http://www.dnrtv.com/default.aspx" id="186" class="track_this_link"  title="dnrTv is a fusion of a training video and an interview show." target="_blank"><img src="http://open.thumbshots.org/image.aspx?url=http://www.dnrtv.com/default.aspx" alt="dnrTV" title="dnrTv is a fusion of a training video and an interview show." class="alignleft" /></a> <a href="http://www.dnrtv.com/default.aspx" id="186" class="track_this_link"  title="dnrTv is a fusion of a training video and an interview show." target="_blank">dnrTV</a>
<br/>dnrTv is a fusion of a training video and an interview show.</p><br/>
<p style='display:table;width:100%;'><a href="http://www.youtube.com/user/microsoftlearning" id="193" class="track_this_link"  title="Microsoft Learning Training" target="_blank"><img src="http://open.thumbshots.org/image.aspx?url=http://www.youtube.com/user/microsoftlearning" alt="Microsoft Learning&#039;s Channel" title="Microsoft Learning Training" class="alignleft" /></a> <a href="http://www.youtube.com/user/microsoftlearning" id="193" class="track_this_link"  title="Microsoft Learning Training" target="_blank">Microsoft Learning&#039;s Channel</a>
<br/>Microsoft Learning Training</p><br/>
<p style='display:table;width:100%;'><a href="http://ontwik.com/" id="169" class="track_this_link"  title="Lectures, Screencasts and conferences for real web developers &amp; designers" target="_blank"><img src="http://open.thumbshots.org/image.aspx?url=http://ontwik.com/" alt="Ontwik" title="Lectures, Screencasts and conferences for real web developers &amp; designers" class="alignleft" /></a> <a href="http://ontwik.com/" id="169" class="track_this_link"  title="Lectures, Screencasts and conferences for real web developers &amp; designers" target="_blank">Ontwik</a>
<br/>Lectures, Screencasts and conferences for real web developers &amp; designers</p><br/>
<p style='display:table;width:100%;'><a href="http://feeds2.feedburner.com/SpaghettiCodePodcasts" id="194" class="track_this_link"  title="Collection of video/screencasts by Jeff Brand. There are three main components to Spaghetti Code : ScreenCasts, Interviews and &quot;Almost Live&quot;" target="_blank"><img src="http://open.thumbshots.org/image.aspx?url=http://feeds2.feedburner.com/SpaghettiCodePodcasts" alt="Spaghetti Code Podcasts" title="Collection of video/screencasts by Jeff Brand. There are three main components to Spaghetti Code : ScreenCasts, Interviews and &quot;Almost Live&quot;" class="alignleft" /></a> <a href="http://feeds2.feedburner.com/SpaghettiCodePodcasts" id="194" class="track_this_link"  title="Collection of video/screencasts by Jeff Brand. There are three main components to Spaghetti Code : ScreenCasts, Interviews and &quot;Almost Live&quot;" target="_blank">Spaghetti Code Podcasts</a>
<br/>Collection of video/screencasts by Jeff Brand. There are three main components to Spaghetti Code : ScreenCasts, Interviews and &quot;Almost Live&quot;</p><br/>
<p style='display:table;width:100%;'><a href="http://tekpub.com/channels/free" id="190" class="track_this_link"  title="This is the .NET Open Source channel where we do what we can to give back to the community. Project leaders can create screencasts for their projects, give them to us to polish and render, and we stream them from our streaming servers. " target="_blank"><img src="http://open.thumbshots.org/image.aspx?url=http://tekpub.com/channels/free" alt="TekPub" title="This is the .NET Open Source channel where we do what we can to give back to the community. Project leaders can create screencasts for their projects, give them to us to polish and render, and we stream them from our streaming servers. " class="alignleft" /></a> <a href="http://tekpub.com/channels/free" id="190" class="track_this_link"  title="This is the .NET Open Source channel where we do what we can to give back to the community. Project leaders can create screencasts for their projects, give them to us to polish and render, and we stream them from our streaming servers. " target="_blank">TekPub</a>
<br/>This is the .NET Open Source channel where we do what we can to give back to the community. Project leaders can create screencasts for their projects, give them to us to polish and render, and we stream them from our streaming servers. </p><br/>
<p style='display:table;width:100%;'><a href="http://tv.telerik.com/" id="189" class="track_this_link"  title="Training videos, webinars, Tips &amp; Tricks" target="_blank"><img src="http://open.thumbshots.org/image.aspx?url=http://tv.telerik.com/" alt="Telerik TV" title="Training videos, webinars, Tips &amp; Tricks" class="alignleft" /></a> <a href="http://tv.telerik.com/" id="189" class="track_this_link"  title="Training videos, webinars, Tips &amp; Tricks" target="_blank">Telerik TV</a>
<br/>Training videos, webinars, Tips &amp; Tricks</p><br/>
	</table>
</div><script type='text/javascript'>
jQuery(document).ready(function()
{
jQuery('a.track_this_link').click(function() {
jQuery.post('http://www.sambeauvois.be/blog/wp-content/plugins/link-library/tracker.php', {id:this.id});
return true;
});
});
</script></div>

<!-- End of Link Library Output -->


]]></content:encoded>
			<wfw:commentRss>http://www.sambeauvois.be/blog/2011/03/6-sources-of-videocasts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

