Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Prodentim Probiotics Specially Designed For The Health Of Your Teeth And Gums

Instant Grammar Checker - Correct all grammar errors and enhance your writing

Teach Your Child To Read

Powerful WordPress hosting for WordPress professionals

Disclosure: My content contains affiliate links.

31,128 questions

40,777 answers

573 users

How to write number with format string to a text file in VB.NET

1 Answer

0 votes
Imports System.IO

Module Module1

    Sub Main()

        Using writer As StreamWriter = New StreamWriter("D:\\numbers.txt")
            Dim i As Integer
            For i = 1 To 20 Step 2
                writer.WriteLine("{0:0.0} ", i)
            Next i
        End Using

    End Sub


    ' run:
    ' 
    ' 1.0 
    ' 3.0 
    ' 5.0 
    ' 7.0 
    ' 9.0 
    ' 11.0 
    ' 13.0 
    ' 15.0 
    ' 17.0 
    ' 19.0 

End Module





answered Mar 31, 2015 by avibootz
edited Jun 27, 2015 by avibootz

Related questions

1 answer 82 views
1 answer 89 views
2 answers 129 views
1 answer 91 views
1 answer 76 views
...