c# - What is a clean/intuitive approach to extending a sealed class in .NET 1.1? -


I'm in the process of architecting a library that will be used in many parts of the product and part of its work. The functionality is to increase which is not present in .NET 1.1, because we need to use it. Perhaps the best example of this is the String.IsNullOrEmpty method, whose functionality we depend heavily on heavily.

In the string class the .NET is sealed; I have thought of using the adapter or decorator pattern to wrap up the original string and increase the functionality of the class, but I'm not sure what I'm trying to do, this is a very intuitive approach. I have also seen a similar question, but it again raises the issue which I have just mentioned.

I can definitely use the functionality that uses the adapter, but I am not able to imagine it is for each string:

  bool IsEmpty = new StringExtensionAdapter (myXmlNode.SelectSingleNode (myXpathString)). IsNullOrEmpty (); If (AETT) {// do something}  

I do not like to dislike this view, but it seems that this is a result in many memory management where a different solution might be better Apart from this, I am not mad about creating a "string utility" library, because from that point of view, I have to move beyond object-oriented design. I

Any input will be useful; If I am just crazy and should use one of these methods, then tell me I am searching for best practices compared to solutions because I have many.

I personally like the "StringUtility" library with a stable IsNullOrEmpty method briefly summoning you To be known, there will be no good syntax.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -