I'm using the following code to open a file and then trying to write something to it:
public partial class MainWindow : Window
{
StreamWriter file = null;
public MainWindow()
{
InitializeComponent();
using (file = new StreamWriter("../data/floorPlane.txt", true))
{
file.WriteLine("x \t y \t z \t w \n");
}
}
}
But it always gives the following error:
A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll
Additional information: 'The invocation of the constructor on type 'SkeletalViewer.MainWindow' that matches the specified binding constraints threw an exception.
I'm totally new to c#. Maybe the question is kindof stupid.
Thanks,