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. Visual Basic
  4. Importing system classes

Importing system classes

Scheduled Pinned Locked Moved Visual Basic
question
4 Posts 3 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.
  • D Offline
    D Offline
    directred
    wrote on last edited by
    #1

    Hi, I want to use the class System.io and wonder where I put this class in my code. I put the imports system.io at the assemblyinfo.vb but no success in a form when I try and get some info e.g. my.computer.name or my.application.assemblyinfo.companyname. The squickally line appears below my. What simple thing am I doing wrong?

    C 1 Reply Last reply
    0
    • D directred

      Hi, I want to use the class System.io and wonder where I put this class in my code. I put the imports system.io at the assemblyinfo.vb but no success in a form when I try and get some info e.g. my.computer.name or my.application.assemblyinfo.companyname. The squickally line appears below my. What simple thing am I doing wrong?

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      directred wrote:

      I want to use the class System.io

      That is a namespace, not a class.

      directred wrote:

      I put the imports system.io at the assemblyinfo.vb

      Don't. It won't do anything for you there.

      directred wrote:

      What simple thing am I doing wrong?

      Put the Imports System.IO at the top of each file that needs to use classes in that namespace. Alternatively, you can use the fully qualified name for each class. e.g. System.IO.FileStream


      *** Developer Day 4 in Reading, England on 2nd December 2006 - Registration Now Open *** Upcoming Scottish Developers events: * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog | Photos

      S 1 Reply Last reply
      0
      • C Colin Angus Mackay

        directred wrote:

        I want to use the class System.io

        That is a namespace, not a class.

        directred wrote:

        I put the imports system.io at the assemblyinfo.vb

        Don't. It won't do anything for you there.

        directred wrote:

        What simple thing am I doing wrong?

        Put the Imports System.IO at the top of each file that needs to use classes in that namespace. Alternatively, you can use the fully qualified name for each class. e.g. System.IO.FileStream


        *** Developer Day 4 in Reading, England on 2nd December 2006 - Registration Now Open *** Upcoming Scottish Developers events: * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog | Photos

        S Offline
        S Offline
        secortez
        wrote on last edited by
        #3

        Example: Imports System.IO Public Class FileSystem Function FileExists(Byval sFile as String) as Boolean If File.Exists(sFile) Then Return True Else Return False End If End Function End Class SMC

        C 1 Reply Last reply
        0
        • S secortez

          Example: Imports System.IO Public Class FileSystem Function FileExists(Byval sFile as String) as Boolean If File.Exists(sFile) Then Return True Else Return False End If End Function End Class SMC

          C Offline
          C Offline
          Colin Angus Mackay
          wrote on last edited by
          #4

          You might prefer to reply to the original poster rather than me. It wasn't me that was looking for help.


          *** Developer Day 4 in Reading, England on 2nd December 2006 - Registration Now Open *** Upcoming Scottish Developers events: * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog | Photos

          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