1. Not sure what you exactly mean but if you are looking for the current
user, you can use System.Environment.UserName
2. Read Data from a file using StreamReader
string myFilePath = @"C:\myfile.ini";
string myFileText = string.Empty;
using (System.IO.StreamReader sr = new System.IO.StreamReader(myFilePath ))
{
myFileText = sr.ReadToEnd();
sr.Close();
}
Your specifics may be different, you may be reading line by line, which is
equally simple. B the way if you want to store settings for your application
you'd probably be better off creating a configuration file...by using
Add->Configuration File to your project, which will create an app.config
file, which is nothing but an xml file that can be read easily, using
System.Configuration..............
"Eifel-benz" <Ei********@lycos.de> wrote in message
news:A7**********************************@microsof t.com...
I'm working the first days with Visual C#.net. So most of you think these
questions are really easy.
1. How can I read out the windows-account?
2. How can I read datas from an INI-file?
A short example will help me quiet good.
Thanks.