java, *.jar to c# .NET

 

Use tools from ikvm.net to generate .NET libraries out of java code.

 

c#.NET file acces denied problem

I was trying to access a file with the user having only read permission. the code looked like:

FileStream fs =new FileStream( “c:\path\to\file.ext”, FileMode.Open);

and it uset to throw exception “access denied”. After some investigations I’ve found that FileAccess.Read helps a lot. FileStream fs = new FileStream( “c:\path\to\file.ext”, FileMode.Open, FileAccess.Read);

Generic Configuration Section Handler

Check this link. It is a good way to deal with configuration sections in .NET environment.