Recent Posts
Recent Comments
Link
관리 메뉴

NaggingMachine

Orcas에 대한 질문 (Question about Extension feature of Orcas) 본문

TechnoBabbler

Orcas에 대한 질문 (Question about Extension feature of Orcas)

naggingmachine 2006. 11. 21. 23:07
As an MVP, I can view all the documents from Orcas Develop Division throught SpecShare. Today I just found out a video about codename Orcas that is next version of Visual Studio. A developer P.M. showed a extension feature in the video, it was very cool, however I think there could be a problem with the spec of it.

----------------------

Great Video! Thanks

BTW, I have a question for DJ. You show the example regarding new static method extension.
Your code example was like following.

static class MyExtension
{
public static void Func ( static int i );
}










- Usages
1) MyExtension.Func ( 5 );
2) int i = 5;
  i.Func ( );

Your example was very cool, but it gave me a idea of another example that could be a problem. My question is that what if I have static Func() method from two different static classes like following example.

static class MyExtension
{
public static void Func ( static int i );
}

static class MyExtension2
{
public static void Func ( static int i );
}
- Usage
int i = 5;
i.Func(); // uses MyExtension.Func or MyExtension2.Func ?

Because variable i just called static Func without identifying staitc class name, I think it will be problem when I extend the first example.

I'm looking forward to hearing from you. :-)

Regards,
Wooseok.

Microsoft Visual C# MVP