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

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,855 questions

51,776 answers

573 users

How to return boolean from method in VB.NET

1 Answer

0 votes
Imports System

Public Class Program
    Public Shared Function Equal(ByVal str1 As String, ByVal str2 As String) As Boolean
        Return str1 = str2
    End Function
  
    Public Shared Sub Main()
        Dim s1 As String = "vb.net"
        Dim s2 As String = "vb.net"
                                          
        if (Equal(s1, s2))
            Console.Write("Equal")
        else
            Console.Write("Not Equal")
       End If
    End Sub
End Class
  
  
  
  
' run
'
' Equal
'

 



answered Jan 2, 2022 by avibootz

Related questions

1 answer 95 views
1 answer 242 views
242 views asked Jan 2, 2022 by avibootz
1 answer 227 views
1 answer 188 views
2 answers 199 views
1 answer 281 views
...