Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. class not showing up

class not showing up

Scheduled Pinned Locked Moved C#
questionworkspace
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 508833
    wrote on last edited by
    #1

    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.

    T 2 Replies Last reply
    0
    • U User 508833

      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.

      T Offline
      T Offline
      TigerNinja_
      wrote on last edited by
      #2

      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?

      U 1 Reply Last reply
      0
      • U User 508833

        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.

        T Offline
        T Offline
        TigerNinja_
        wrote on last edited by
        #3

        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?

        1 Reply Last reply
        0
        • T TigerNinja_

          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?

          U Offline
          U Offline
          User 508833
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups