<?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>Mind-driven development &#187; C#</title>
	<atom:link href="http://www.minddriven.de/index.php/category/technology/dot-net/c-sharp/feed" rel="self" type="application/rss+xml" />
	<link>http://www.minddriven.de</link>
	<description>Matthias Jauernig -- .NET technology, architecture and design</description>
	<lastBuildDate>Sun, 29 Jan 2012 19:31:38 +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>C#: Efficient retrieval of Expression values</title>
		<link>http://www.minddriven.de/index.php/technology/dot-net/c-sharp/efficient-expression-values</link>
		<comments>http://www.minddriven.de/index.php/technology/dot-net/c-sharp/efficient-expression-values#comments</comments>
		<pubDate>Mon, 11 Oct 2010 07:42:09 +0000</pubDate>
		<dc:creator>Matthias Jauernig</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Compile]]></category>
		<category><![CDATA[expressions]]></category>
		<category><![CDATA[GetValue]]></category>
		<category><![CDATA[Invoke]]></category>

		<guid isPermaLink="false">http://www.minddriven.de/?p=1066</guid>
		<description><![CDATA[Some days ago I&#8217;ve had an interesting technical discussion with a colleague of mine regarding the possibility of implementing Guard classes with Expressions in C#. Such a class enables easy argument checking in form of (technical) preconditions on method entry. Thereby the checking logic is encapsulated in the Guard class. One method of such a [...]]]></description>
			<content:encoded><![CDATA[<p>Some days ago I&#8217;ve had an interesting technical discussion with a colleague of mine regarding the possibility of implementing <strong>Guard classes with Expressions in C#</strong>. Such a class enables easy argument checking in form of <em>(technical) preconditions</em> on method entry. Thereby the checking logic is encapsulated in the <a href="http://ajdotnet.wordpress.com/2009/08/01/posting-guards-guard-classes-explained/">Guard class</a>.</p>
<p>One method of such a <code>Guard</code> class could be <code>AssertNotNull()</code> which checks, if a given method argument equals <code>null</code> and if true throws an <code>ArgumentNullException</code>. By the use of Expressions the parameter to check can be given to <code>AssertNotNull()</code> in a very elegant way:</p>
<pre class="brush:csharp;">public void MyMethod(SomeType elem)
{
    Guard.AssertNotNull(() =&gt; elem);

    // actual method logic
}</pre>
<p>Through evaluation of the <code>Expression</code> the <code>AssertNotNull()</code> method is able to extract both the <strong>name and value of the argument</strong>. Thus there&#8217;s no necessity to provide both as parameters to <code>AssertNotNull()</code>. Moreover you do not need to provide the argument name as <code>string</code>.</p>
<h3>Value by compilation</h3>
<p>It&#8217;s very easy to extract the argument value through <strong>compilation and invocation</strong> of the <code>Expression</code>. Hence this solution is often taken by developers who work with Expressions in this way. The following snippet shows this implementation:</p>
<pre class="brush:csharp;">public static class Guard
{
    public static void AssertNotNull&lt;T&gt;(Expression&lt;Func&lt;T&gt;&gt; selector)
    {
        T value = selector.Compile().Invoke();
        if (value == null)
        {
            string name = ((MemberExpression)selector.Body).Member.Name;
            throw new ArgumentNullException(name);
        }
    }
}</pre>
<h3>Value by evaluation</h3>
<p>In the conversation with my colleague we caught the point that the extraction of the argument value from an <code>Expression</code> is even possible <strong>without performing the costly compilation</strong>. This is enabled by converting the <code>Expression</code> into a <code>ConstantExpression</code>, from which we can catch the value by executing <code>GetValue()</code> on a <code>FieldInfo</code> instance:</p>
<pre class="brush:csharp;">public static class Guard
{
    public static void AssertNotNull&lt;T&gt;(Expression&lt;Func&lt;T&gt;&gt; selector)
    {
        var memberSelector = (MemberExpression)selector.Body;
        var constantSelector = (ConstantExpression)memberSelector.Expression;
        object value = ((FieldInfo)memberSelector.Member)
            .GetValue(constantSelector.Value);

        if (value == null)
        {
            string name = ((MemberExpression)selector.Body).Member.Name;
            throw new ArgumentNullException(name);
        }
    }
}</pre>
<p>This doesn&#8217;t look very spectacular on first sight. The code is more complicated and it&#8217;s necessary to provide a variable in the <code>Expression</code>. Properties and data hierarchies don&#8217;t work with this solution, but this shouldn&#8217;t be a problem when checking argument values against <code>null</code>. Of course with a more sophisticated solution (iterative/recursive evaluation of the <code>Expression</code> tree) you can enable such scenarios, but this is out of scope of this blog post&#8230;</p>
<h3>Looking at the execution times</h3>
<p>So what&#8217;s the point of the second solution? It&#8217;s simple: compilation is <strong>much more time-intensive</strong>! In a little runtime test I&#8217;ve compared both solutions. A call of <code>AssertNotNull()</code> with a valid argument (<code>!= null</code>) over 10.000 iterations resulted in the following execution times:</p>
<p><img class="alignnone size-full wp-image-1071" title="Execution times for Expression evaluation" src="http://www.minddriven.de/wp-content/uploads/2010/10/ExpressionEvaluation.png" alt="" width="249" height="60" /></p>
<p>Please note the immensive time difference! The compiled solution takes more than <strong>53 seconds</strong>, while the evaluation takes less than <strong>0,35 seconds</strong>. This makes a <strong>time factor of more than 156</strong>, by which the evaluated solution is faster than the compiled approach.</p>
<h3>Conclusion</h3>
<p>When handling with Expressions you should take the execution time into account! Once a method is executed inside of a loop and you follow defensive programming and check method parameters at every place, an argument check can become an important time factor. When possible you should <strong>favor evaluation over compilation</strong> of Expressions.</p>
<p><a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.minddriven.de%2f%3fp%3d1066"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.minddriven.de%2f%3fp%3d1066" border="0" alt="kick it on DotNetKicks.com" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.minddriven.de/index.php/technology/dot-net/c-sharp/efficient-expression-values/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting encapsulated type of Nullable</title>
		<link>http://www.minddriven.de/index.php/technology/dot-net/c-sharp/underlying-nullable-type</link>
		<comments>http://www.minddriven.de/index.php/technology/dot-net/c-sharp/underlying-nullable-type#comments</comments>
		<pubDate>Sun, 08 Aug 2010 11:01:26 +0000</pubDate>
		<dc:creator>Matthias Jauernig</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[encapsulated type]]></category>
		<category><![CDATA[Nullable]]></category>
		<category><![CDATA[Reflection]]></category>

		<guid isPermaLink="false">http://www.minddriven.de/?p=1013</guid>
		<description><![CDATA[Just a short tip for today.. Sometimes I&#8217;ve had the requirement to treat value types, where I don&#8217;t know if the value type is Nullable&#60;T&#62; or not. Regardless of whether the value type is declared as Nullable&#60;T&#62; or not, it should everytime be treat as T. Thus I&#8217;ve had to find out the underlying type [...]]]></description>
			<content:encoded><![CDATA[<p>Just a short tip for today..</p>
<p>Sometimes I&#8217;ve had the requirement to treat value types, where I don&#8217;t know if the <strong>value type is Nullable&lt;T&gt;</strong> or not. Regardless of whether the value type is declared as <code>Nullable&lt;T&gt;</code> or not, it should everytime be treat as <code>T</code>. Thus I&#8217;ve had to find out the underlying type of the <code>Nullable&lt;T&gt;</code>.</p>
<p>The following <strong>extension method on <code>Type</code></strong> realizes this requirement:</p>
<pre class="brush:csharp">public static class TypeExtensions
{
    public static Type GetBareType(this Type dataType)
    {
        if (dataType != null)
        {
            if (dataType.IsGenericType &amp;&amp;
               (dataType.GetGenericTypeDefinition() == typeof(Nullable&lt;&gt;)))
            {
                dataType = Nullable.GetUnderlyingType(dataType);
            }
        }
        return dataType;
    }
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.minddriven.de/index.php/technology/dot-net/c-sharp/underlying-nullable-type/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is the Specification Pattern obsolete?</title>
		<link>http://www.minddriven.de/index.php/technology/dot-net/c-sharp/specification-pattern-obsolete</link>
		<comments>http://www.minddriven.de/index.php/technology/dot-net/c-sharp/specification-pattern-obsolete#comments</comments>
		<pubDate>Thu, 08 Oct 2009 16:59:14 +0000</pubDate>
		<dc:creator>Matthias Jauernig</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Design patterns]]></category>
		<category><![CDATA[expressions]]></category>
		<category><![CDATA[patterns]]></category>
		<category><![CDATA[specification pattern]]></category>

		<guid isPermaLink="false">http://www.leading-edge-dev.de/?p=466</guid>
		<description><![CDATA[I&#8217;m a guy who loves many of the new patterns that I get to know. But sometimes when I show that pattern to colleagues around me, they tilt their heads and say: &#8220;Arrrm, who needs this?&#8221;. Often they help me to get back to the ground and think again about intents and benefits of one [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a guy who loves many of the new patterns that I get to know. But sometimes when I show that pattern to colleagues around me, they tilt their heads and say: &#8220;Arrrm, who needs this?&#8221;. Often they help me to get back to the ground and think again about intents and benefits of one or the other pattern.</p>
<p>Currently I&#8217;m rethinking the <a href="http://en.wikipedia.org/wiki/Specification_pattern">Specification Pattern</a>, which has been <a href="http://www.martinfowler.com/apsupp/spec.pdf">introduced</a> by Eric Evans and Martin Fowler some time ago and got some attention in the <a href="http://en.wikipedia.org/wiki/Domain-driven_design">DDD</a> community and beyond. The intent of the Specification Pattern is to separate the logic for (e.g.) filtering an entity from the entity itself. This responsibility is encapsulated in single classes &#8211; the specifications. Those specifications are given for example to a single method <code>Filter()</code> on a <em>repository</em>, which takes care of filtering the <em>domain model</em> by the specifications. Thus, you bypass the need for having several special methods in your repository which take care of the actual filter operation (such as <code>FilterByCustomerName()</code>, <code>FilterByCustomerAddress()</code> etc.).</p>
<p>An example interface snippet for a repository of persons with a specification filter method could then be:</p>
<pre class="brush:csharp">interface IPersonRepository
{
    IEnumerable&lt;Person&gt; Filter(ISpecification&lt;Person&gt; filterTerm);
    // ...
}</pre>
<p>Summarized, some key benefits of the Specification Pattern are:</p>
<ul>
<li><em>Loose coupling</em> of the filter logic from the objects being filtered,</li>
<li><em>Single responsibility</em>: Interface of repository/data provider isn&#8217;t polluted with lots of filter methods,</li>
<li>Callers can express in a <em>flexible</em> way by which criteria entities can be filtered,</li>
<li><em>Composition</em> of specifications (e.g. by a <a href="http://en.wikipedia.org/wiki/Fluent_interface">fluent interface</a>) yields to flexible filter queries, for example:<br />
[sourcecode language='c#']var filter = Filter
<person>.By<ageabove>(25).And<workingin>(&#8220;Frankfurt&#8221;)[/sourcecode]</workingin></ageabove></person></li>
</ul>
<p>But now the provocative question that one could come with: <strong>Who needs the Specification Pattern in times of C# 3.0 and Expressions?</strong> This might sound disturbing at first, but let me explain&#8230;<br />
C# 3.0 came up with the new concept of Expressions/Expression trees. This way, code can be treated as a kind of syntax tree in the program. Developers can extend the tree with additional code portions and then compile it into executable code which can be invoked.</p>
<p>Therefore Expressions seem to give us similar benefits for filtering as specifications do. By using Expressions, we are able to define a single <code>Filter()</code> method on the repository, which gets an appropriate Expression as argument. Consumers of the repository can call this method with their custom filter Expressions and thus we&#8217;ve got the same benefits: loose coupling of filter logic and objects to be filtered, flexibility for callers to provide custom filter criteria and the possibility to combine several filter criteria (several Expressions).<br />
One could argue that with specifications we&#8217;ve got better encapsulation of the filter logic into separate classes. But this can be done with Expressions as well (e.g. by separate wrapper classes or dedicated Expression providers), so that isn&#8217;t a good argument&#8230;</p>
<p>The interface of a repository of persons with a filter that uses Expressions might look like this:</p>
<pre class="brush:csharp">interface IPersonRepository
{
    IEnumerable&lt;Person&gt; Filter(Expression&lt;Predicate&lt;Person&gt;&gt; filterTerm);
    // ...
}</pre>
<p>This leads again to the question: Do we still need the Specification Pattern or is it already embedded with Expressions in the language (C# 3.0) itself?</p>
<h4>Pattern focus</h4>
<p>First I want to mention that the intent of a <em>pattern</em> is not (only) to provide a technical solution, but also a conceptual guideline for a problem at hand. Thus Expressions as technical solution don&#8217;t cover the intent of the Specification Pattern. The Specification Pattern can be implemented with the help of Expressions, but that&#8217;s another point. So, directly comparing the Specification Pattern with Expressions is like an apple-pear-comparison.</p>
<h4>Encapsulation focus</h4>
<p>Let&#8217;s come to use cases when I would prefer the use of dedicated specification classes rather than directly using Expressions.<br />
First as a team lead you could want to enforce the use of dedicated specification classes in your development team (thus enforce encapsulation of the filter logic). By giving Expressions or Predicates to filter methods directly,  developers would be allowed to define filter expressions whereever they want to. You don&#8217;t have the control over this process and please don&#8217;t trust your project guidelines: If developers are allowed to do something wrong, they will do.</p>
<p>With specifications you can force your team members to write specification classes for their requirements, which leads to enforced <em>encapsulation</em>. Furthermore you drive <em>reuse</em> of existing specification classes. Other developers are encouraged to use existing specifications, especially because of the additional effort for writing new specifications. By combining several specifications, the reusability aspect is pushed even more.</p>
<h4>Domain model focus</h4>
<p>Giving consumers the full flexibility of defining custom filter criteria with specifications can be very handsome in many situations. However, in other scenarios instead of giving full flexibility, you may want to restrict the set of filters for your domain model. If you focus on your domain, you perhaps want a restricted set of specifications, each with a very specific meaning in your domain! Binding such specifications to your domain model makes the purpose of your domain and how it can/should be used in terms of filtering much clearer.</p>
<p>Technically, in order to restrict access to a particular set of specifications, you could create sealed specification classes <em>inside</em> of your domain model services (same layer as repository). Consumers of the repository would be allowed to call the <code>Filter()</code> method on the repository with those specifications (and compositions of those), but they would not be able to create new specifications if you don&#8217;t mark the specification interface as public. This way you get two characteristics: Restricted filtering, which fits into your domain and your use cases on the one hand, and encapsulation/separation of filter logic and entities which should be filtered on the other hand.</p>
<h4>Bottom line</h4>
<p>This article started with an interesting and provocative question: Is the Specification Pattern obsolete? This question came up with a look at Expressions in C# 3.0. Technically you can achieve similar results when using Expressions instead of implementing the Specification classes by hand. But as the last sections have shown, in my opinion the Specification Pattern is <em>not</em> obsolete! As <em>pattern</em> it&#8217;s adding very specific value to the plain technical solution, when you take encapsulation and domains into account. Then it clearly goes beyond the technical aspect which many developers see at first sight.</p>
<p>Those are my current thoughts on specifications, but of course my opinions are not carved in stone. What do you think? What points I&#8217;ve missed perhaps? I&#8217;m eager for your comments!</p>
<p><a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.leading-edge-dev.de%2f%3fp%3d466"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.leading-edge-dev.de%2f%3fp%3d466" border="0" alt="kick it on DotNetKicks.com" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.minddriven.de/index.php/technology/dot-net/c-sharp/specification-pattern-obsolete/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>C# covariance and contravariance</title>
		<link>http://www.minddriven.de/index.php/technology/dot-net/c-sharp/covariance-contravariance</link>
		<comments>http://www.minddriven.de/index.php/technology/dot-net/c-sharp/covariance-contravariance#comments</comments>
		<pubDate>Sat, 07 Mar 2009 18:53:45 +0000</pubDate>
		<dc:creator>Matthias Jauernig</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[C# 4.0]]></category>
		<category><![CDATA[contravariance]]></category>
		<category><![CDATA[covariance]]></category>

		<guid isPermaLink="false">http://www.leading-edge-dev.de/?p=246</guid>
		<description><![CDATA[Hey guys. Sorry that I was not posting bigger stuff for a long time. I&#8217;ve had some personal time-eaters during the last months, but I hope it will get better soon. Today&#8217;s topic during this article is covariance and contravariance in general and especially in C#. What is it? Who needs it? How is it [...]]]></description>
			<content:encoded><![CDATA[<p>Hey guys. Sorry that I was not posting bigger stuff for a long time. I&#8217;ve had some personal time-eaters during the last months, but I hope it will get better soon. Today&#8217;s topic during this article is covariance and contravariance in general and especially in C#. What is it? Who needs it? How is it supported today? How will it be supported in C# 4.0? Answers have to be found&#8230;</p>
<p>So, <em>covariance</em> and <em>contravariance</em> are features of a programming language&#8217;s type system (not limited to C# at all). More precisely (and theoretically), they are characteristics of binary operators, which convert one type to another type. Generally if an operator changes the type in some kind, it&#8217;s called <em>variant</em>. If it retains the type (the type is fix), then it&#8217;s called <em>invariant</em>. Two types of <em>variant</em> operators are contravariant and covariant operators. In fact, there are other types of variance (consider dynamic typing, duck typing etc.), thus covariant/contravariant operators are just two examples for that. If an operator orders types in the way from general to more specific for any type, then it is called to be <em>covariant</em>. If it orders types reversely from specific to more general, then it&#8217;s <em>contravariant</em>.</p>
<p>So far the theoretical introduction. It&#8217;s pretty much saying nothing about what both terms mean in your practical coding life, isn&#8217;t it? Well&#8230; in programming languages there are two features where co- and contravariance can make sense: <em>return type covariance</em> and <em>parameter type contravariance</em>.</p>
<h3>Return type covariance</h3>
<p>Let&#8217;s consider the interface <code>IClonable</code> for a moment. It&#8217;s declared as:</p>
<pre class="brush:csharp">public interface ICloneable
{
    object Clone();
}</pre>
<p>If we want a class <code>Foo</code> to implement this interface, then it has to apply the exact same signature:</p>
<pre class="brush:csharp">public class Foo : ICloneable
{
    public object Clone()
    {
        Foo clone = new Foo();
        // cloning implementation
        // ...

        return clone;
    }
}</pre>
<p>Wouldn&#8217;t it be nice to have a method <code>public Foo Clone()</code> instead? That&#8217;s what return type covariance means. With this, the return type would be narrowed by more specific implementations or derivations. It would give type-safety to all callers of the method. Yes, this would be nice, indeed. But that&#8217;s a feature, which is currently not implemented in the C# language. The more general return type in the interface or a base class can not be narrowed on implementing or deriving classes. The same problem arises in a number of cases and on generics, as we will see later on.</p>
<h3>Parameter type contravariance</h3>
<p>If we got a method on an interface or base class which takes a parameter <code>X</code>, then contravariance is all about wanting a more general parameter in the implementation method of that interface or in a derived class. C# doesn&#8217;t support that, yet. For example, the following will not work:</p>
<pre class="brush:csharp">class Fruit { }
class Apple : Fruit { }
class Cherry : Fruit { }
class FlavorComparer : IComparer&lt;Fruit&gt; { ... }

public void SortApples()
{
    List&lt;Apple&gt; apples = GetSomeApples();
    IComparer&lt;Fruit&gt; flavorComparer = new FlavorComparer();
    apples.Sort(flavorComparer);
}</pre>
<p><code>FlavorComparer</code> compares two fruits based on their flavor. Apples are fruits, so why shouldn&#8217;t they be sorted with use of the <code>FlavorComparer</code>? This would be nice, but <code>Sort()</code> needs a <code>IComparer&lt;Apple&gt;</code> and not the more general argument <code>IComparer&lt;Fruit&gt;</code>. It should be no problem for using the more general comparer, but C# doesn&#8217;t support this at the moment.</p>
<h3>Covariance on arrays</h3>
<p>Since the first C# (1.0), covariance on arrays is supported. Thus, one could write:</p>
<pre class="brush:csharp">Fruit[] fruits = new Apple[10];
fruits[0] = new Cherry();</pre>
<p>An array of a reference type can be viewed as an array of its base type or any implemented interface. That&#8217;s no problem for the compiler, it just works. But at runtime, that example would produce an <code>ArrayTypeMismatchException</code> and that&#8217;s what one would expect in this example. Creating apples and setting one to a cherry is no good idea.</p>
<p>Well, but why does it compile? That&#8217;s a historical problem. In the first version of C#, it has been designed to attract as many developers as possible and since this type of covariance worked in Java, the C# guys applied it to their language as well. Not that good idea, but that&#8217;s another story&#8230;</p>
<h3>Covariance and contravariance on generics</h3>
<p>Generics in C# 1.0 to 3.0 are <em>invariant</em> (fix). If we map the array example to generics, then the following code will not work:</p>
<pre class="brush:csharp">List&lt;Fruit&gt; fruits = new List&lt;Apple&gt;();
fruits.Add(new Cherry());</pre>
<p>In this case, there&#8217;s no exception thrown at runtime, but already the compiler comes up with an error message at the first line. Invariance on generics is a serious limitation of current C# versions, since it doesn&#8217;t allow many intuitively correct cases.</p>
<p>For example, if you have a method <code>List&lt;Fruit&gt; GetFruits()</code> on the <code>Fruit</code> class, which gets overridden by the <code>Apple</code> class, then you can&#8217;t return an instance of <code>List&lt;Apple&gt;</code>, which should be no problem intuitively. The following code on <code>Apple</code> is not working:</p>
<pre class="brush:csharp">public List&lt;Fruit&gt; GetFruits()
{
    List&lt;Apple&gt; fruits = GetApples();
    return fruits;
}</pre>
<p>The same problem arises, if we want to have a list of fruits, which should be a Union of apples and cherries, which are both fruits&#8230;</p>
<pre class="brush:csharp">List&lt;Fruit&gt; fruits = new List&lt;Fruit&gt;();
List&lt;Cherry&gt; cherries = GetCherries();
List&lt;Apple&gt; apples = GetApples();

fruits = fruits.Union(cherries).Union(apples);</pre>
<p>This or similar code doesn&#8217;t work as well.</p>
<h3>C# 4.0</h3>
<p>Having all that in mind, C# 1.0-3.0 is some kind of nerving limited in terms of covariance and contravariance. It has covariance on arrays of reference types and C# 2.0 introduced covariance and contravariance on delegates (which obviates some really annoying workarounds), but at the whole there should be better language support of those type-system features.</p>
<p>But a knight in shining armour is approaching: C# 4.0 arises on the horizon! But does it hold what it looks like? In fact, with C# 4.0 you have the <code><strong>in</strong></code> and <code><strong>out</strong></code> keywords, which you can define on type arguments of interfaces and delegates.</p>
<p>With the <strong><code>out</code></strong> keyword you can define a type parameter to be <em>covariant</em>. This means, that implementations of methods which return an object of this type can also return a more specific type. The standard example in this case is <code>IEnumerable&lt;out T&gt;</code>:</p>
<pre class="brush:csharp">public interface IEnumerable&lt;out T&gt; : IEnumerable
{
    IEnumerator&lt;T&gt; GetEnumerator();
}

public interface IEnumerator&lt;out T&gt; : IDisposable, IEnumerator
{
    T Current { get; }
}</pre>
<p>This allows you to write e.g.:</p>
<pre class="brush:csharp">IEnumerable&lt;object&gt; list = new List&lt;string&gt;();</pre>
<p>and</p>
<pre class="brush:csharp">IEnumerable&lt;Fruit&gt; fruits = new List&lt;Apple&gt;();</pre>
<p>It allows you to have a base type as type parameter of an <code>IEnumerable</code> instance and a more specific type if you assign something to it. But wait: there&#8217;s a limitation on that&#8230; <code>out T</code> means: <em>no </em>method in this interface is allowed to use <code>T</code> as parameter! The word &#8220;<code>out</code>&#8221; makes this clear and it limits the use of those covariance to just a few interfaces. For example, this cannot be set on the <code>ICollection&lt;T&gt;</code> interface (and furthermore on <code>IList&lt;T&gt;</code>, because of <code>IList&lt;T&gt; : ICollection&lt;T&gt;</code>). <code>ICollection&lt;T&gt;</code> includes a method <code>Add(T item)</code> and since no <code>T</code> is allowed to be used when <code>out T</code> is declared, that wouldn&#8217;t work. Now, most of my own generic interfaces and many .NET interfaces as well use type parameters as in- and output, so this new type of covariance seems to be not <em>this</em> influencing. For example, the following code would <strong>not</strong> work:</p>
<pre class="brush:csharp">IList&lt;object&gt; list = new List&lt;string&gt;();</pre>
<p>But why? There&#8217;s an important aspect on that and that is the same as on the array example in the paragraph &#8220;Covariance on arrays&#8221;. Having the <code>Add()</code> method, one could add an instance of type <code>object</code> to the list and that has not to be allowed:</p>
<pre class="brush:csharp">IList&lt;object&gt; list = new List&lt;string&gt;();
list.Add(new object());  // mustn't be allowed</pre>
<p>Sure, that&#8217;s a big limitation, but it makes sense and is absolutely necessary!</p>
<p>The same comes true for the <strong><code>in</code></strong> keyword. One can define an interface with type parameter <code>in T</code>. With that, <code>T</code> can only be used as type parameter and not as return value. But this brings <em>contravariance</em> on the type parameters to life. Having the <code>FlavorComparer</code> example from above in mind? That will work, if <code>IComparer&lt;in T&gt;</code> is declared by the .NET framework. The limitation of <code>T</code> to be set as method parameter only is necessary due to the same aspect as for the <code>out</code> keyword. If <code>IList&lt;in T&gt;</code> should have been declared and one defines a variable <code>IList&lt;string&gt; list</code> and calls <code>list.Add(new object())</code>, then it would make no sense to iterate through all list elements as string, because the inserted <code>object</code> is no <code>string</code> and would cause problems.</p>
<p>So in the end, the knight&#8217;s armour is not <em>that</em> shiny. C# 4.0 comes with some nice covariance and contravariance features, but the <code>out</code> and <code>in</code> parameters are fairly limited (and using them together is (luckily) not allowed). Many people are annoyed about that, but I don&#8217;t share their opinion. It&#8217;s a good thing to have covariance and contravariance on type parameters separated from each other! Else this would produce heavy problems as we have seen in the examples above and in the array covariance section. My opinion is, that the language designers have done a good job here. I don&#8217;t want to have some kind of <code>ArrayTypeMismatchException</code> on generics and thus <code>in/out</code> on type parameters are a good thing.</p>
<p>Links:</p>
<ul>
<li><a href="http://blogs.msdn.com/ericlippert/archive/tags/Covariance+and+Contravariance/default.aspx">http://blogs.msdn.com/ericlippert/archive/tags/Covariance+and+Contravariance/default.aspx</a></li>
<li><a href="http://blogs.msdn.com/charlie/archive/2008/10/28/linq-farm-covariance-and-contravariance-in-visual-studio-2010.aspx">http://blogs.msdn.com/charlie/archive/2008/10/28/linq-farm-covariance-and-contravariance-in-visual-studio-2010.aspx</a></li>
<li><a href="http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Anders-Hejlsberg-The-Future-of-C/">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Anders-Hejlsberg-The-Future-of-C/</a></li>
</ul>
<p><a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.leading-edge-dev.de%2f%3fp%3d246"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.leading-edge-dev.de%2f%3fp%3d246" border="0" alt="kick it on DotNetKicks.com" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.minddriven.de/index.php/technology/dot-net/c-sharp/covariance-contravariance/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>C# 4.0 Neuerungen</title>
		<link>http://www.minddriven.de/index.php/technology/dot-net/c-40-neuerungen</link>
		<comments>http://www.minddriven.de/index.php/technology/dot-net/c-40-neuerungen#comments</comments>
		<pubDate>Tue, 28 Oct 2008 08:05:55 +0000</pubDate>
		<dc:creator>Matthias Jauernig</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[C# 4.0]]></category>
		<category><![CDATA[NET 4.0]]></category>

		<guid isPermaLink="false">http://www.leading-edge-dev.de/?p=33</guid>
		<description><![CDATA[Die ersten Neuerungen kurz in 3 Stichpunkten: Aufruf dynamischer Sprachen: dynamic-Schlüsselwort Optionale Funktionsparameter wie in C++ (wie ich das vermisst habe!) Rückgabe anonymer Typen durch Funktionen Einen umfassenden Überblick über die Neuerungen gibt ein Word-Dokument, welches Microsoft hier zum Download bereitstellt. Links: http://www.outofcoffeeexception.de/2008/10/27/C+40+Dynamic+Keyword.aspx http://www.outofcoffeeexception.de/2008/10/27/C+40+Optionale+Parameter.aspx http://www.outofcoffeeexception.de/2008/10/27/C+40+Mit+Dynamic+Anonyme+Typen+Zuruumlckgeben+Und+Verwenden.aspx http://blogs.msdn.com/dparys/archive/2008/10/28/neue-m-glichkeiten-in-c-4-0.aspx]]></description>
			<content:encoded><![CDATA[<p>Die ersten Neuerungen kurz in 3 Stichpunkten:</p>
<ul>
<li>Aufruf dynamischer Sprachen: dynamic-Schlüsselwort</li>
<li>Optionale Funktionsparameter wie in C++ (wie ich das vermisst habe!)</li>
<li>Rückgabe anonymer Typen durch Funktionen</li>
</ul>
<p>Einen umfassenden Überblick über die Neuerungen gibt ein Word-Dokument, welches Microsoft <a href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=csharpfuture&amp;DownloadId=3550">hier</a> zum Download bereitstellt.</p>
<p>Links:</p>
<ul>
<li><a href="http://www.outofcoffeeexception.de/2008/10/27/C+40+Dynamic+Keyword.aspx">http://www.outofcoffeeexception.de/2008/10/27/C+40+Dynamic+Keyword.aspx</a></li>
<li><a href="http://www.outofcoffeeexception.de/2008/10/27/C+40+Optionale+Parameter.aspx">http://www.outofcoffeeexception.de/2008/10/27/C+40+Optionale+Parameter.aspx</a></li>
<li><a href="http://www.outofcoffeeexception.de/2008/10/27/C+40+Mit+Dynamic+Anonyme+Typen+Zuruumlckgeben+Und+Verwenden.aspx">http://www.outofcoffeeexception.de/2008/10/27/C+40+Mit+Dynamic+Anonyme+Typen+Zuruumlckgeben+Und+Verwenden.aspx</a></li>
<li><a href="http://blogs.msdn.com/dparys/archive/2008/10/28/neue-m-glichkeiten-in-c-4-0.aspx">http://blogs.msdn.com/dparys/archive/2008/10/28/neue-m-glichkeiten-in-c-4-0.aspx</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.minddriven.de/index.php/technology/dot-net/c-40-neuerungen/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Die Zukunft von C#</title>
		<link>http://www.minddriven.de/index.php/technology/dot-net/c-sharp/die-zukunft-von-c</link>
		<comments>http://www.minddriven.de/index.php/technology/dot-net/c-sharp/die-zukunft-von-c#comments</comments>
		<pubDate>Sun, 26 Oct 2008 10:35:35 +0000</pubDate>
		<dc:creator>Matthias Jauernig</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C# 4.0]]></category>
		<category><![CDATA[C-Omega]]></category>
		<category><![CDATA[deklarative Programmierung]]></category>
		<category><![CDATA[F#]]></category>
		<category><![CDATA[funktionale Programmierung]]></category>
		<category><![CDATA[Parallel Extensions]]></category>
		<category><![CDATA[Parallele Programmierung]]></category>
		<category><![CDATA[Polyphonic C#]]></category>
		<category><![CDATA[Spec#]]></category>

		<guid isPermaLink="false">http://www.leading-edge-dev.de/?p=8</guid>
		<description><![CDATA[Da ich stets in aktuellen Entwicklungen von C# interessiert bin, habe ich ein wenig im Internet recherchiert und fasse nachfolgend einige interessante Hinweise mit den entsprechenden Links zusammen, wo die Reise hin geht. In Zukunft möchte ich diesen Text mit aktuellen Entwicklungen weiter ausbauen, die derzeitige Version ist lediglich als Ausgangspunkt gedacht.   Integration von [...]]]></description>
			<content:encoded><![CDATA[<div class="ms-wikicontent">
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A">Da ich stets in aktuellen Entwicklungen von C# interessiert bin, habe ich ein wenig im Internet recherchiert und fasse nachfolgend einige interessante Hinweise mit den entsprechenden Links zusammen, wo die Reise hin geht. In Zukunft möchte ich diesen Text mit aktuellen Entwicklungen weiter ausbauen, die derzeitige Version ist lediglich als Ausgangspunkt gedacht.</div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A"> </div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A"><span style="font-size: medium;">Integration von C-Omega Sprachelementen</span></div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A"> </div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A"><a href="http://research.microsoft.com/Comega/">C-Omega</a> ist eine experimentelle Sprache von Microsoft Research und offiziell gibt es keine Pläne für deren Verwendung. Trotzdem fand bereits die Übernahme einiger Sprachelemente in C# statt, wie es auch in einem <a href="http://www.infoworld.com/article/05/06/10/HNhejlsberg_1.html">Interview mit Anders Hejlsberg</a> zur Sprache kommt. Bei C-Omega handelt es sich um eine Spracherweiterung von C#. Sie fokussiert dabei vor allem auf Probleme, welche bei der Erstellung netzwerkartiger, lose gebundener Applikationen entstehen. Diese betreffen die nebenläufige/parallele Programmierung auf der einen Seite und die Integration von relationalen Daten und XML auf der anderen Seite.</div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A"> </div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A">Beim Thema Nebenläufigkeit werden einige Konzepte eingeführt, die zunächst unter dem Namen &#8220;Polyphonic C#&#8221; implementiert wurden und auf die bessere Unterstützung paralleler Abarbeitung (zum Beispiel durch neue Sprachelemente und die bessere Unterstützung von Asynchronität) abzielen. Mit einer besseren Einbindung relationaler Daten sollen weiterhin die bisher nahezu getrennten Welten der Programmiersprachen und der Datenbanken miteinander vereint werden, indem ein leichterer Datenzugriff aus der Programmiersprache heraus stattfindet und dabei für Typsicherheit gesorgt wird. C-Omega setzt diese Idee um mit LINQ wurde dieses Konzept in .NET übernommen. Auch der getypte Zugriff auf XML-Daten bzw. die einfache und typsichere Traversierung eines XML-Baums ist in C-Omega möglich, allerdings fand noch keine direkte Übernahme in C#/.NET statt (abgesehen von der LINQ-Unterstützung für XML-Daten). Hier darf man gespannt sein, ob und wann dies nachgeholt wird.</div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A"> </div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A"><span style="font-size: medium;">Nebenläufige/Parallele Programmierung</span></div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A"> </div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A">In der besseren Unterstützung nebenläufiger Programmierung bzw. der Erstellung paralleler Programme liegt eine große Herausforderung für die weitere Programmiersprachenentwicklung, bei der C# durch seine derzeit noch vorherrschende hohe Dynamik eine Vorreiterrolle spielen kann. Dem Thema Parallelität kommt dabei eine wachsende Bedeutung zu, da sich die Architektur heutiger Rechner und Netzwerke durch die Verbreitung von Multicore-Ansätzen und der lose gekoppelter Netzwerke (Cloud Computing) stetig wandelt. Jedoch wird Parallelität auch von aktuellen Programmiersprachen wie C# oder Java nur über Thread-und-Lock-Ansätze unterstützt, welche in den 1970er Jahren entwickelt wurden und die Programmierung nebenläufiger Applikationen schwer und unhandlich machen.</div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A"> </div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A">Microsoft hat mit dem <a href="http://msdn.microsoft.com/en-us/concurrency/default.aspx">Parallel Computing Developer Center</a> einen Bereich geschaffen, der sich dem Thema Parallelität/Nebenläufigkeit widmet und dem einige Hinweise auf Entwicklungen für C#/.NET entnommen werden können. So sind mit den <a href="http://blogs.msdn.com/pfxteam/">Parallel Extensions</a> eine ganze Reihe von Spracherweiterungen für C#/.NET verfügbar, welche erste Möglichkeiten für die einfache Erstellung paralleler Programme beinhalten. Neben thread-sicheren Collections bietet z.B. die Klasse System.Threading.Parallel statische Methoden &#8220;For&#8221;, &#8220;ForEach&#8221; etc. an, mit denen eine einfache Parallelisierung von Programmkonstrukten erreicht werden kann. Interessant ist ebenfalls die Einbindung eines parallelen LINQ (PLINQ).</div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A"> </div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A">Zukünftig dürfte es nicht bei einer Spracherweiterung bleiben. Die Parallel Extensions werden meiner Meinung nach bald in neue Releases von C# bzw. das .NET-Framework selbst Einzug halten und so die parallele Programmierung vereinfachen. Doch das dürfte erst die Spitze des Eisberges sein. Mittelfristig ist ein kompletter Paradigmenwechsel zur parallelen Programmierung hin nötig, was allein über Spracherweiterungen schwer erreichbar erscheint. Auf jeden Fall sind neue Sprachkonzepte erforderlich, welche die Übersichtlichkeit bei der Erstellung großer paralleler Applikationen wahren und wiederkehrende Muster in eigene Konstrukte kapseln. Eine Art Katalog an &#8220;Parallel Design Patterns&#8221; wäre hierbei sicherlich hilfreich.</div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A"> </div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A">Was Microsoft zu dem Thema zu sagen hat, wird auf der PDC 2008 öffentlich werden. Mit einem separaten Pre-Conference-Day und 4 Konferenz-Sessions auf der PDC wird der Parallelisierung genügend Raum geboten.</div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A"> </div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A"><span style="font-size: medium;">C# 4</span></div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A"> </div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A">In einem <a href="http://channel9.msdn.com/posts/Charles/C-40-Meet-the-Design-Team/">Interview</a> mit den C#-Designern auf Channel 9 werden erste Details geliefert, in welche Richtung sich C# 4 entwickeln könnte. Unter anderem wird über die Notwendigkeit von C# gesprochen, mit &#8220;dynamischen&#8221; Sprachen wie IronPython oder IronRuby zu interagieren und diese besser einzubinden. In diesem Zusammenhang könnte es auch zu einem Ausbau der Möglichkeiten für das Meta-Programming kommen. In dem Interview wird ebenfalls eine Vereinfachung konkurrierender Aufrufe angekündigt.</div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A">Insgesamt stellt sich die Frage, wie weit die Sprachdefinition selbst mit neuen Features aufgebläht werden sollte, ohne sie zu unübersichtlich zu machen und Entwickler (vor allem Neueinsteiger) abzuschrecken.</div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A"> </div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A"><span style="font-size: medium;">Diese anderen Sharp&#8217;s&#8230;</span></div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A"> </div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A">Ein Blick auf Microsoft Research lohnt immer, da Forschungs-Projekte zunächst zwar losgelöst sind von konkreten Applikationen, jedoch Microsoft auch einen Nutzen bringen sollen und damit früher oder später Auswirkungen auf bestehende Elemente wie C# und .NET haben.</div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A"> </div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A"><a href="http://research.microsoft.com/SpecSharp/">Spec#</a> stellt beispielsweise eine Spracherweiterung für C# dar, welche die Erstellung von Qualitätssoftware vereinfachen soll. Das grundlegende Prinzip ist dabei <a href="http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/">programming by contract</a>. Der Programmierer gibt vor, wie sich beispielsweise eine Methode zu verhalten hat (Vor- und Nachbedingungen), was in der Spec#-Syntax geschieht. Zur Compilezeit wird geprüft, ob die Methode diesen &#8220;Vertrag&#8221; einhält. Programming by contract ist auch für die Parallelisierung von Programmen interessant, da hierüber ausgesagt werden kann, wie sich eine Funktion verhält, z.B. ob sie interne Zustände einer Klasse ändert oder andere Seiteneffekte hat. Der Compiler kann dann anhand dieser Aussagen und ihrer Prüfung entscheiden, wie eine Parallelisierung anzustreben ist.</div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A"> </div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A">Dass sich gewisse Dinge in einer funktionalen Programmiersprache einfacher und schneller implementieren lassen, ist hinlänglich bekannt. Quicksort lässt sich z.B. in Haskell elegant in <a href="http://de.wikipedia.org/wiki/Haskell_(Programmiersprache)#QuickSort">3 Zeilen Code</a> abhandeln. <a href="http://research.microsoft.com/fsharp/fsharp.aspx">F#</a> stellt eine Implementierung des funktionalen Programmierparadigmas dar, auch wenn es nicht &#8220;rein&#8221; funktional ist. Gewisse Konstrukte wie die Lambda-Ausdrücke wurden bereits in C# integriert, andere Anleihen dürften folgen. Auch anderen Paradigmen wie der deklarativen Programmierung sollten man ein Augenmerk schenken, hier wurde mit WPF/XAML ja auch schon ein erster Beitrag geleistet. Funktionale Programmierung ist für das Sprach-Design-Team bei Microsoft besonders interessant, da funktionale Programme per se frei sind von Seiteneffekten. Sie lassen sich daher von Haus aus gut parallelisieren. Es wird zwar kein kompletter Paradigmenwechsel angestrebt (dafür sind funktionale Programme zu ineffektiv), aber es werden &#8220;Inseln&#8221; in der funktionalen Programmierung gesucht, mit welchen sich die aktuellen Probleme imperativer Programmiersprachen wie C# elegant handhaben lassen.</div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A"> </div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A"><span style="font-size: medium;">Weitere Links</span></div>
<div class="ExternalClassBA3EC7CD18684C35A685CD6F7B1FFF8A">
<ul>
<li><a href="http://codebetter.com/blogs/matthew.podwysocki/archive/2008/05/22/what-is-the-future-of-c-anyways.aspx"><span style="font-size: small; font-family: Calibri;">http://codebetter.com/blogs/matthew.podwysocki/archive/2008/05/22/what-is-the-future-of-c-anyways.aspx</span></a></li>
<li><span style="font-size: 11pt; line-height: 115%; font-family: 'Calibri','sans-serif';"><a href="http://www.dotnetjunkies.com/WebLog/johnwood/archive/2005/01/20/46840.aspx">http://www.dotnetjunkies.com/WebLog/johnwood/archive/2005/01/20/46840.aspx</a></span></li>
<li><span style="font-size: 11pt; line-height: 115%; font-family: 'Calibri','sans-serif';"><a href="http://evain.net/blog/articles/2008/07/29/net-4-c-4-and-the-dlr">http://evain.net/blog/articles/2008/07/29/net-4-c-4-and-the-dlr</a></span></li>
<li><span style="font-size: 11pt; line-height: 115%; font-family: 'Calibri','sans-serif';"><a href="http://www.computerworld.com.au/index.php/id;1149786074">http://www.computerworld.com.au/index.php/id;1149786074</a></span></li>
<li><span style="font-size: 11pt; line-height: 115%; font-family: 'Calibri','sans-serif';"><a href="http://channel9.msdn.com/posts/Charles/Anders-Hejlsberg-and-Guy-Steele-Concurrency-and-Language-Design/">http://channel9.msdn.com/posts/Charles/Anders-Hejlsberg-and-Guy-Steele-Concurrency-and-Language-Design/</a></span></li>
</ul>
</div>
<p> </p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.minddriven.de/index.php/technology/dot-net/c-sharp/die-zukunft-von-c/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

