当前位置: 动力学知识库 > 问答 > 编程问答 >

windows phone 7 - C#: Add classes To an already existing library

问题描述:

Is it possible to add a class (or wlasses) to an existing library. I want to use an ItemTemplateSelector in Windows Phone development and I know how to implement it but can I add it to System.Windows.Controls rathe than add it separately?

网友答案:

You can do it by creating your component and re-use the namespace

namespace System.Windows.Control
{
   \\Put your code here
}

You will have a seperate dll, but it will belong to the same namespace.

However you should not do this. It is a bad practice to extend .Net Framework libraries and not recommended by Microsoft. The main reason for this is that changes in later version of the .Net Framework might collide with the changes.

分享给朋友:
您可能感兴趣的文章:
随机阅读: