class not showing up
-
when i type in System.Environment.GetFolderPath it's asking for a value of type System.Environment.SpecialFolder but when i try to type that in it doesn't show up in the list that comes up. what am i doing wrong? thanks, Rob -- There are 10 kinds of people. Those who understand binary and those who don't.
-
when i type in System.Environment.GetFolderPath it's asking for a value of type System.Environment.SpecialFolder but when i try to type that in it doesn't show up in the list that comes up. what am i doing wrong? thanks, Rob -- There are 10 kinds of people. Those who understand binary and those who don't.
show up in the list that comes up I guess you are referring to intellisense. This works fine for me:
this.textBox1.Text = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Recent);
R.Bischoff .NET, Kommst du mit?
-
when i type in System.Environment.GetFolderPath it's asking for a value of type System.Environment.SpecialFolder but when i try to type that in it doesn't show up in the list that comes up. what am i doing wrong? thanks, Rob -- There are 10 kinds of people. Those who understand binary and those who don't.
This will enumerate all special folders with their respective path. requiremnts, create a ListView named listView1 in your win form, then paste code into button event handler or Initialize()
private void button2_Click(object sender, System.EventArgs e) { ListViewItem lvi = null; foreach(Environment.SpecialFolder sf in Enum.GetValues(typeof(Environment.SpecialFolder))) { lvi = new ListViewItem(Enum.Parse(typeof(Environment.SpecialFolder), sf.ToString(), true).ToString()); lvi.SubItems.Add(Environment.GetFolderPath(sf)); listView1.Items.Add(lvi); } }
R.Bischoff .NET, Kommst du mit?
-
show up in the list that comes up I guess you are referring to intellisense. This works fine for me:
this.textBox1.Text = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Recent);
R.Bischoff .NET, Kommst du mit?
why is the System namespace in both System.dll and mscorlib.dll? and when i use object browser to look in the mscorlib.dll it has System.Environment but no SpecialFolder enum listed. so why does the code that you gave me work if it won't show up in object browser or intellisense? are there other classes, namespaces, etc. that are not listed? thanks, Rob -- There are 10 kinds of people. Those who understand binary and those who don't.