VB.NET: Assign value to variable inside an IF condition? -


Is there a possibility to specify a variable within a IF condition in VB.NET?

Something like this:

  Dormant customer in the form of a customer = nothing if the customer (customer = GetCustomer (ID)) then the wrong end return  

thanks

Sorry, on the other hand, it will be really confusing, because VB.Net uses the same operator for both assignment and parity.

  If a = b then 'Wait, is this an assignment or comparison? ! Instead, just set up the variable and compare:  
  Customer as a dormant client = nothing Customer = GetCustomer (ID) if not (Customer) then return false end if  

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -