The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Testing compatibility for Whidbey/Everett

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Dan Fernandez

Posts: 456
Nickname: danielfe
Registered: Aug, 2003

Daniel Fernandez is the Product Manager for C# in the developer division at Microsoft.
Testing compatibility for Whidbey/Everett Posted: Dec 3, 2003 4:35 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Dan Fernandez.
Original Post: Testing compatibility for Whidbey/Everett
Feed Title: Dan Fernandez's Blog
Feed URL: /msdnerror.htm?aspxerrorpath=/danielfe/Rss.aspx
Feed Description: Dan discusses Dot Net.
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Dan Fernandez
Latest Posts From Dan Fernandez's Blog

Advertisement

Someone sent a question recently to an internal alias so I thought I would share. The question was what will happen when a C# V1 component consumes a C# V2 component that exposes a generic class.  First some background information, there are two types of compatibility, backward compatibility and forward compatibility. 

  • Backward compatibility refers to a future version of a product, like Whidbey, supporting already existing functionality like something found in .
  • Forward compatibility refers to an older product, like Everett, being able to support a new feature like generics.

As you can imagine, it's easier to add backward compatibility since it is a known thing.  Designing for forward compatibility can be more difficult as it is an unknown thing.  The goal of C# Whidbey is geared more towards backward compatibility so that if you write a component today for version 1.x, your component will "just work" in C# Whidbey. 

I decided to test what forward compatibility will work with the current Tech preview for a VS Whidbey component to be used in VS 2003. To test forward compatibility, I created a simple generic class with two static methods.  The first method returns a generic collection, the second returns a non-generic collection.

V2 Code

public class GenericClass

{

 

     public static List<int> ReturnGeneric()

     {

           List<int> l = new List<int>();

           l.Add(1);

           return l;

     }

    

     public static ArrayList ReturnNonGeneric()

     {

           ArrayList ar = new ArrayList();

           ar.Add(1);

           return ar;

     }

}

 

I added a reference to the GenericClass in VS 2003. Using IntelliSense, the only method that is available to execute is GenericClass.ReturnNonGeneric() since VS 2003 doesn't understand a non-generic type.  Since VS 2003 doesn't understand generic types it can't call the ReturnGeneric() method.

 

 

 

 

Read: Testing compatibility for Whidbey/Everett

Topic: Windows Forms Reference Application Previous Topic   Next Topic Topic: SCCBridge: Free Remote Access Client for VSS

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use