Advertisement
Guest User

WILL LOOK HERE

a guest
Sep 26th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.13 KB | None | 0 0
  1. Imports System.Console
  2. Imports System.IO
  3.  
  4. Module Module1
  5.  
  6.     Sub Main()
  7.         WriteLine("Menu")
  8.         WriteLine()
  9.         WriteLine("1. Import File")
  10.         WriteLine("2. Add contents of file to array")
  11.         WriteLine("3. Check string length")
  12.         WriteLine("4. Check for invalid characters")
  13.         WriteLine("5. Export File")
  14.         WriteLine("6. Exit")
  15.  
  16.         Dim choice As String = ReadLine()
  17.  
  18.         If Not IsNumeric(choice) And choice < 7 And choice > 0 Then
  19.             WriteLine("Please enter a numeric value")
  20.             Threading.Thread.Sleep(1500)
  21.             Main()
  22.         End If
  23.         Dim fileName As String = Nothing
  24.         If choice = 1 Then
  25.             fileName = ReadLine()
  26.  
  27.         ElseIf choice = 2 Then
  28.             Dim fileContents As New List(Of String)
  29.             For Each line In fileName
  30.                 fileContents.Add(line)
  31.             Next
  32.         ElseIf choice = 3 Then
  33.             CheckLength()
  34.         End If
  35.  
  36.  
  37.     End Sub
  38.  
  39.     Sub CheckLength(fileContents As List(Of String))
  40.         For Each line In fileContents
  41.  
  42.         Next
  43.     End Sub
  44.  
  45. End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement