An object-oriented programming language developed by Microsoft that can be used in .NET.
Hi @Sani Love ,
For the speed in bits per second, you can use the following code to convert it to Kbps, Mbps, or Gbps based on the value.
Function ConvertSpeedToReadable(speedInBitsPerSecond As ULong) As String
Dim speed As Double = Convert.ToDouble(speedInBitsPerSecond)
If speed < 1000000 Then
Return $"{speed / 1000:F2} Kbps"
ElseIf speed < 1000000000 Then
Return $"{speed / 1000000:F2} Mbps"
Else
Return $"{speed / 1000000000:F2} Gbps"
End If
End Function
Best Regards.
Jiachen Li
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.