Ok Solomon, I tried to figure this out and failed. Forgive my CLR noobness (I create about 1 CLR/year) and I'm sure this is simple but I'm having a hard time compiling your code. I've been playing around with this on/off for the past week.
I've been trying with the csc.exe in .NET 3.5 and 2.0 I've added (then removed when it did not help) this to the top using <namespace> statements...
using System;
using System.Data;
using Microsoft.SqlServer.Server;
I saved your code as NGramsNV4000.cs and have been attempting to compile the code using this command:
C:\Windows\Microsoft.NET\Framework\v2.0.50727>csc.exe /target:library NGramsNV4000.cs
This is what I get in v2.0.50727:
C:\Windows\Microsoft.NET\Framework\v2.0.50727>csc.exe /target:library NGramsNV4000.cs
Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.5483
for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.
NGramsNV4000.cs(5,15): error CS1518: Expected class, delegate, enum, interface,
or struct
NGramsNV4000.cs(6,29): error CS1518: Expected class, delegate, enum, interface,
or struct
NGramsNV4000.cs(21,26): error CS1518: Expected class, delegate, enum, interface,
or struct
NGramsNV4000.cs(23,7): error CS1001: Identifier expected
NGramsNV4000.cs(23,9): error CS1518: Expected class, delegate, enum, interface,
or struct
NGramsNV4000.cs(24,7): error CS1001: Identifier expected
NGramsNV4000.cs(24,9): error CS1518: Expected class, delegate, enum, interface,
or struct
NGramsNV4000.cs(24,21): error CS1518: Expected class, delegate, enum, interface,
or struct
NGramsNV4000.cs(24,32): error CS1518: Expected class, delegate, enum, interface,
or struct
NGramsNV4000.cs(31,23): error CS1518: Expected class, delegate, enum, interface,
or struct
NGramsNV4000.cs(34,2): error CS1022: Type or namespace definition, or
end-of-file expected
NGramsNV4000.cs(6,27): error CS0101: The namespace '<global namespace>' already
contains a definition for '?'
NGramsNV4000.cs(4,57): (Location of symbol related to previous error)
NGramsNV4000.cs(23,7): error CS0101: The namespace '<global namespace>' already
contains a definition for '?'
NGramsNV4000.cs(4,57): (Location of symbol related to previous error)
NGramsNV4000.cs(24,7): error CS0101: The namespace '<global namespace>' already
contains a definition for '?'
NGramsNV4000.cs(4,57): (Location of symbol related to previous error)
NGramsNV4000.cs(24,31): error CS0101: The namespace '<global namespace>' already
contains a definition for '?'
NGramsNV4000.cs(4,57): (Location of symbol related to previous error)
This is what I get in v3.5:
C:\Windows\Microsoft.NET\Framework\v3.5>csc.exe /target:library NGramsNV4000.cs
Microsoft (R) Visual C# 2008 Compiler version 3.5.30729.5420
for Microsoft (R) .NET Framework version 3.5
Copyright (C) Microsoft Corporation. All rights reserved.
NGramsNV4000.cs(8,15): error CS1518: Expected class, delegate, enum, interface,
or struct
NGramsNV4000.cs(9,29): error CS1518: Expected class, delegate, enum, interface,
or struct
NGramsNV4000.cs(24,26): error CS1518: Expected class, delegate, enum, interface,
or struct
NGramsNV4000.cs(26,7): error CS1001: Identifier expected
NGramsNV4000.cs(26,9): error CS1518: Expected class, delegate, enum, interface,
or struct
NGramsNV4000.cs(27,7): error CS1001: Identifier expected
NGramsNV4000.cs(27,9): error CS1518: Expected class, delegate, enum, interface,
or struct
NGramsNV4000.cs(27,21): error CS1518: Expected class, delegate, enum, interface,
or struct
NGramsNV4000.cs(27,32): error CS1518: Expected class, delegate, enum, interface,
or struct
NGramsNV4000.cs(34,23): error CS1518: Expected class, delegate, enum, interface,
or struct
NGramsNV4000.cs(37,2): error CS1022: Type or namespace definition, or
end-of-file expected
-- Itzik Ben-Gan 2001