TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Kumar AU
1.4k
320
63k
Reading the file with line Position, its getting added leading zeros
Dec 13 2020 11:17 AM
I have File which has many lines related to bank account details. So while reading the file, sometimes the Account Number field is getting assigned with leading 0's as shown in this number 123456782135435000. Could you please suggest me how can I avoid leading 0's ?
the Exact Number should be - 123456782135435 but Most of the time account number will be in 16 characters. For example like this : 6689161615476256
This is the exsiting code where I am reading the line position in a file for the accountNumber
var accountNumber = Line.Substring(52, 16);
NewFileLine =
showToken => Line.Replace(Line.Substring(52, 16), showToken.PadRight(16))
Kindly let me know , how do I avoid the leading Zero's for the account number.
Reply
Answers (
4
)
When do we need to use async?
Embed .exe files?