title: Function doesn't return a value on all code paths Vb.net
body: <p>I'm somewhat new to programming and I am having trouble just making this work.  I'm supposed to run this code using a delegate but I've run into error after error.  I'm using Vb.net.  Could anyone help me solve the issues in this code?</p>
  
  <pre><code>Public Delegate Function D()
  Dim Str As String = Console.ReadLine()
  Sub Main()
      Dim D1 As D
      D1 = New D(AddressOf Fn1)
  End Sub
  Function Fn1()
      System.Console.WriteLine("Please enter the string")
  
      Dim revstr As String = StrReverse(Str)
      Console.WriteLine("Reverse:")
      Console.WriteLine(revstr)
  
      Console.WriteLine("Amount of characters in the string:")
      Dim Count As Integer = Str.Length
      Console.WriteLine(Count)
  
      Console.WriteLine("Amount of words in the string:")
      Dim TempA() As String = Str.Split(" ")
      Console.WriteLine(TempA.Length &amp; " ")
      Console.ReadKey()
  End Function
  </code></pre>
  
  <p>Thanks for any help anyone can give!</p>