Option Strict On Imports System.Net Imports System.IO Public Class Weather Dim Source As New RichTextBox Public Function Temperatur(PLZ As String) As Double Try Dim httpRequest As HttpWebRequest = CType(HttpWebRequest.Create("http://api.openweathermap.org/data/2.5/weather?q=" & PLZ & "&mode=xml"), HttpWebRequest) Dim httpResponse As HttpWebResponse = CType(httpRequest.GetResponse(), HttpWebResponse) Dim reader As StreamReader = New StreamReader(httpResponse.GetResponseStream) Source.Text = reader.ReadToEnd Dim temper As Double = 0 For Each line In Source.Lines If line.StartsWith(" ", "") End If Next Return text Catch ex As Exception Return Nothing End Try End Function End Class