4
Answers

problem trying to create a simple class

Administrator

Administrator

22y
1.5k
1
Hi all, I'm getting an error message when I try to run the following class. The error message is: "object reference not set to an instance of an object." This error message is referring to variable "a" below when I try to increment it in the "for" statement "a++". Any suggestions would be very much appreciated. Thanks. Mike using System; using System.IO; namespace HEIAN_TRANSFER { /// /// Summary description for HeianFiles. /// This returns an array of file names in a specific folder. /// public class HeianFiles { private string[] pathNames; private string[] theFile; public string[] fileNames; public HeianFiles() { } public string[] GetFiles(string thePath) { int spot; pathNames = Directory.GetFiles(thePath); int nbrFiles = pathNames.Length; for(int a=0;a
Answers (4)
0
kevint
NA 54 0 20y
Try this. " Salamander .NET Linker and mini-deployment tool allows you to link .NET assemblies together into a single file, and to deploy your application without installation of the whole Microsoft .NET Framework. The linker selectively links MSIL code putting together only the required classes and methods, and it is capable of linking into the Microsoft .NET framework class libraries. The mini-deployment tool then builds a minimum set of the Microsoft .NET runtime to ship with your application. This usually results in installation size of a few mega bytes, rather than tens of mega bytes, and the installation takes much less time without rebooting machines. The mini-deployed application can be launched directly from a CD, absolutely without copying files or adding registry entries." Regards KevinT
0
erwache
NA 4 0 20y
thanks for your replies.. i just thought, that it would be possible, to bind the methods and modules which i need into the .exe so that the exe grows, but obviously it is not possible - what a pity thx maschka
0
spgilmore
NA 591 0 20y
Dynamic and static binding are terms of how the libraries of the runtime are loaded at runtime. Neither of these have to do with linking runtime libraries inside the executable.
0
vitenyi_i
NA 38 0 20y
In the same way that you couldn't run a program coded to the Win API on a non-Windows machine, a program coded to the .NET framework needs the .NET framework.