Solved

VB.Net 2005 - Trying to use Fixed Column Length variables???

Posted on 2007-03-27
1
391 Views
Last Modified: 2012-06-21
I need to create an output text file with fixed length columns. I'm not sure how to do that in VB.Net 2005. I'm thinking that I could write a routine where I pass the variable, the length the column needs to be, the data type (string or number), and then somehow return a variable with a padded value.

Anyone have any ideas on how to do this easier....I'm all ears!!!!

Thanks,
Blake
0
Comment
Question by:BlakeMcKenna
1 Comment
 
LVL 6

Accepted Solution

by:
CodeFish earned 500 total points
ID: 18801063
use the PadLeft/PadRight method of string:

Dim pString as String = "ABC"
pString = pString.PadRight(12)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question