diff --git a/Nuclex.Support (net-2.0).csproj b/Nuclex.Support (net-2.0).csproj
index fca6981..9ec054e 100644
--- a/Nuclex.Support (net-2.0).csproj
+++ b/Nuclex.Support (net-2.0).csproj
@@ -18,7 +18,7 @@
full
false
bin\net-2.0\Debug\
- TRACE;DEBUG;UNITTEST;USE_XMLDOCUMENT
+ TRACE;DEBUG;UNITTEST;USE_XMLDOCUMENT;NO_EXTENSION_METHODS
prompt
4
bin\net-2.0\Debug\Nuclex.Support.xml
@@ -27,7 +27,7 @@
pdbonly
true
bin\net-2.0\Release\
- TRACE;UNITTEST;USE_XMLDOCUMENT
+ TRACE;UNITTEST;USE_XMLDOCUMENT;NO_EXTENSION_METHODS
prompt
4
bin\net-2.0\Release\Nuclex.Support.xml
diff --git a/Nuclex.Support (xna-3.1-xbox360).csproj b/Nuclex.Support (xna-3.1-xbox360).csproj
index a6394af..df6fd49 100644
--- a/Nuclex.Support (xna-3.1-xbox360).csproj
+++ b/Nuclex.Support (xna-3.1-xbox360).csproj
@@ -18,7 +18,7 @@
full
false
bin\xna-3.1-xbox360\Debug\
- TRACE;DEBUG;XBOX;XBOX360;USE_XMLDOCUMENT;NO_SERIALIZATION;NO_SYSTEMEVENTS;XNA_3
+ TRACE;DEBUG;XBOX;XBOX360;USE_XMLDOCUMENT;NO_SERIALIZATION;NO_SYSTEMEVENTS;XNA_3;NO_EXTENSION_METHODS
prompt
4
true
@@ -30,7 +30,7 @@
pdbonly
true
bin\xna-3.1-xbox360\Release\
- TRACE;XBOX;XBOX360;USE_XMLDOCUMENT;NO_SERIALIZATION;NO_SYSTEMEVENTS;XNA_3
+ TRACE;XBOX;XBOX360;USE_XMLDOCUMENT;NO_SERIALIZATION;NO_SYSTEMEVENTS;XNA_3;NO_EXTENSION_METHODS
prompt
4
true
diff --git a/Source/StringHelper.cs b/Source/StringHelper.cs
index ac91870..596c6e3 100644
--- a/Source/StringHelper.cs
+++ b/Source/StringHelper.cs
@@ -37,7 +37,11 @@ namespace Nuclex.Support {
/// array or -1 if all characters in the string were
/// present in the array.
///
+#if NO_EXTENSION_METHODS
public static int IndexNotOfAny(string haystack, char[] anyNotOf) {
+#else
+ public static int IndexNotOfAny(this string haystack, char[] anyNotOf) {
+#endif
return IndexNotOfAny(haystack, anyNotOf, 0, haystack.Length);
}
@@ -55,7 +59,11 @@ namespace Nuclex.Support {
/// array or -1 if all characters in the string were
/// present in the array.
///
+#if NO_EXTENSION_METHODS
public static int IndexNotOfAny(string haystack, char[] anyNotOf, int startIndex) {
+#else
+ public static int IndexNotOfAny(this string haystack, char[] anyNotOf, int startIndex) {
+#endif
return IndexNotOfAny(haystack, anyNotOf, startIndex, haystack.Length - startIndex);
}
@@ -75,7 +83,11 @@ namespace Nuclex.Support {
/// present in the array.
///
public static int IndexNotOfAny(
+#if NO_EXTENSION_METHODS
string haystack, char[] anyNotOf, int startIndex, int count
+#else
+ this string haystack, char[] anyNotOf, int startIndex, int count
+#endif
) {
int anyLength = anyNotOf.Length;
@@ -105,7 +117,11 @@ namespace Nuclex.Support {
/// array or -1 if all characters in the string were
/// present in the array.
///
+#if NO_EXTENSION_METHODS
public static int LastIndexNotOfAny(string haystack, char[] anyNotOf) {
+#else
+ public static int LastIndexNotOfAny(this string haystack, char[] anyNotOf) {
+#endif
return LastIndexNotOfAny(haystack, anyNotOf, haystack.Length - 1, haystack.Length);
}
@@ -123,7 +139,11 @@ namespace Nuclex.Support {
/// array or -1 if all characters in the string were
/// present in the array.
///
+#if NO_EXTENSION_METHODS
public static int LastIndexNotOfAny(string haystack, char[] anyNotOf, int startIndex) {
+#else
+ public static int LastIndexNotOfAny(this string haystack, char[] anyNotOf, int startIndex) {
+#endif
return LastIndexNotOfAny(haystack, anyNotOf, startIndex, startIndex + 1);
}
@@ -143,7 +163,11 @@ namespace Nuclex.Support {
/// present in the array.
///
public static int LastIndexNotOfAny(
+#if NO_EXTENSION_METHODS
string haystack, char[] anyNotOf, int startIndex, int count
+#else
+ this string haystack, char[] anyNotOf, int startIndex, int count
+#endif
) {
int anyLength = anyNotOf.Length;