When do we use ANTLR

You would need these dll’s if you are parsing any text at runtime using an antlr grammar. Typically there are two steps. 1) run the java antlr parser over your .g files to generate a C# lexer, C# grammar and possibly C# tree walkers. 2) Build those files into your application. Those files will work … Read more

How to open an Excel file in C#?

You need to have installed Microsoft Visual Studio Tools for Office (VSTO). VSTO can be selected in the Visual Studio installer under Workloads > Web & Cloud > Office/SharePoint Development. After that create a generic .NET project and add a reference to Microsoft.Office.Interop.Excel via ‘Add Reference… > Assemblies’ dialog. Missing.Value is a special reflection struct … Read more

How can I implement static methods on an interface?

You can’t define static members on an interface in C#. An interface is a contract for instances. I would recommend creating the interface as you are currently, but without the static keyword. Then create a class StaticIInterface that implements the interface and calls the static C++ methods. To do unit testing, create another class FakeIInterface, that also implements the … Read more