All pastes #386333 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-03-08 15:02 UTC
rendered paste body
using System;
using System.IO;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace testnew2
{
	public class FileHandler
	{
		[DllImport( "kernel32.dll", CharSet = CharSet.Auto )]
		public static extern int GetShortPathName(
			[MarshalAs( UnmanagedType.LPTStr )]
        string path,
			[MarshalAs( UnmanagedType.LPTStr )]
        StringBuilder shortPath,
			int shortPathLength
			);

		static void WriteToFile()
		{
			StreamWriter SW;
			SW = File.CreateText( "c:\\MyTextFile.txt" );
			SW.WriteLine( "God is greatest of them all" );
			SW.WriteLine( "This is second line" );
			//här vill jag placera in textfilnamn

			SW.Close();
			Console.WriteLine( "File Created SucacessFully" );
		}

	}
}
//dina grejer....
ArrayList minLista = new ArrayList();
for(int i=0;i<vafan.Length;i++) {
	minLista.Add(vafan[i]);
}

public Vector FilNamnsVektor
        {
            get { return this.filNamnsVektor; }
            set { this.filNamnsVektor = value; }       
        }

andraKlassen.FilNamnsLista = minLista;