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. Verification text file

Verification text file

Scheduled Pinned Locked Moved C#
databasesql-serversysadminquestion
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.
  • T Offline
    T Offline
    tek 2009
    wrote on last edited by
    #1

    hi I want to please your comments and advice in a project: the idea is to write and read from a text file format by checking the size of what is going to write or read, is like creating a table in sql server and fill in according to the size of variables declared if you Propostion in that sense I thank you very much.

    T 1 Reply Last reply
    0
    • T tek 2009

      hi I want to please your comments and advice in a project: the idea is to write and read from a text file format by checking the size of what is going to write or read, is like creating a table in sql server and fill in according to the size of variables declared if you Propostion in that sense I thank you very much.

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

      This isn't very clear, but I think you are asking for help on how to write out a fixed-width column text file? You can use a StringBuilder object to append lines. You can use the PadLeft and PadRight methods on a string to create equally sized columns. If this is not what you are after, please clarify your question a little. Cheers,

      They Call me Mister James

      T 1 Reply Last reply
      0
      • T TheyCallMeMrJames

        This isn't very clear, but I think you are asking for help on how to write out a fixed-width column text file? You can use a StringBuilder object to append lines. You can use the PadLeft and PadRight methods on a string to create equally sized columns. If this is not what you are after, please clarify your question a little. Cheers,

        They Call me Mister James

        T Offline
        T Offline
        tek 2009
        wrote on last edited by
        #3

        ok, i should write in the text file to a value that must not exceed 14 characters, how to do that???

        T 1 Reply Last reply
        0
        • T tek 2009

          ok, i should write in the text file to a value that must not exceed 14 characters, how to do that???

          T Offline
          T Offline
          TheyCallMeMrJames
          wrote on last edited by
          #4

          Check the value of string.length to make sure it doesn't exceed 14:

          if (!yourstring.length>14)
          {
          // blah
          }

          Cheers,

          They Call me Mister James

          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