What is Operators in VB.NET in Hindi
Types of Operators in VB.NET in Hindi - VB.NET में ऑपरेटर्स के प्रकार
Operator | Symbol |
---|---|
OperatorArithmetic | Symbol+, -, *, /,\, Mod |
OperatorComparison | Symbol=,<, <=, > ,>=, <>,Like, Is |
OperatorAssignment | Symbol = |
OperatorLogical/Bitwise | Symbol And, or, Not, Xor, AndAlso, OrElse, IsFalse, IsTrue |
OperatorBit Shift | Symbol<<, >> |
OperatorMiscellaneous | SymbolAddresOf, GetType |
Arithmetic operators
Module Arithmeticoperators
Sub Main ()
Dim a,b,c As Integer
a= 50
b =20
c= a+b
Console.WriteLine ("Addition of a and b is :"&c)
c= a-b
Console.WriteLine ("Substraction of a and b is :"&c)
c= a*b
Console.WriteLine ("Multiplication of a and b is :"&c)
c=a/b
Console.WriteLine ("Division of a and b is :"&c)
c= a mod b
Console.WriteLine ("Mod of a and b is :"&c)
Console.ReadLine()
End Sub
End Module
Comparison/Relational operators
Module Comparisonoperators
Sub Main()
Dim a As Integer = 17
Dim b As Integer = 23
Dim result As Boolean
result = a > b
Console.WriteLine("a>b is:" & result)
result = a < b
Console.WriteLine("a<b is:" & result)
result = a <= b
Console.WriteLine("a<=b is: " & result)
result = a = b
Console.WriteLine("a=b is : " & result)
result = a <> b
Console.WriteLine("a<> b is:" & result)
Console.ReadLine()
End Sub
End Module
Logical operators
Module Logicaloperators
Sub Main()
Dim a As Integer = 10
Dim b As Integer = 17
Console.WriteLine( a> 6 And b<18)
Console.WriteLine(a>6 or b<17)
Console.WriteLine(not b>18)
End Sub
End Module
Assignment operators
Module AssignmentOperator
Sub Main()
Dim a As Integer = 15
Dim b As Integer
b = a
Console.WriteLine("Value of b is : " & b)
Console.ReadLine()
End Sub
End Module
Bitwise Operators
Module Bitwiseoperators
Sub Main()
Dim x As Integer = 3
Dim y As Integer = 5
Dim result As Integer
Dim result1 As Integer
result = x And y
Console.WriteLine("Bitwise Result of x And y is : " & result)
result = x or y
Console.WriteLine("Bitwise Result of x or y is : " & result)
result = x XOR y
Console.WriteLine("Bitwise Result of x XOR y is : " & result)
result1 = Not x
Console.WriteLine("Bitwise Result of Not x is : " & result1)
Console.ReadLine()
End Sub
End Module
Bit Shift Operators
Module Bitleftshiftoperator
Sub Main()
Dim originalnum As Integer = 5
Dim leftshiftednum As Integer = originalnum<< 3
Console.WriteLine("Original number: " & originalnum)
Console.WriteLine("Left Shifted Number is : " & leftshiftednum)
Console.ReadLine()
End Sub
End Module
Module BitrightshiftOperator
Sub Main()
Dim originalnum As Integer = 15
Dim rightshiftednum As Integer = originalnum >> 3
Console.WriteLine("Original number: " & originalnum)
Console.WriteLine("Right Shifted Number is :"& rightshiftednum))
Console.ReadLine()
End Sub
End Module
Miscellaneous Operators
AddressOf
Await
Get Type
Function Expression
If
0 टिप्पणियाँ