, ++/CLI:
using namespace System;
namespace CPPLib
{
[System::Runtime::CompilerServices::Extension]
public ref class StringExtensions abstract sealed
{
public:
[System::Runtime::CompilerServices::Extension]
static bool MyIsNullOrEmpty(String^ s)
{
return String::IsNullOrEmpty(s);
}
};
}
, #:
using CPPLib;
namespace CShartClient
{
class Program
{
static void Main( string[] args )
{
string a = null;
Console.WriteLine( a.MyIsNullOrEmpty() ? "Null Or Empty" : "Not empty" );
a = "Test";
Console.WriteLine( a.MyIsNullOrEmpty() ? "Null Or Empty" : "Not empty" );
Console.ReadKey();
}
}
}
, , ++ " ", #. , .