VB equivalent of the C# ? operator

In C# you can quickly do if statements by using the ‘?’ operator, and check for null values by using the ‘??’ operator.

This is done with the following syntax:

int i = 1;
string result;
i > 1 ? result = "i is greater than one" : result = "i is one or less";


The same shorthand coding style can be achieved in VB.Net (since 2008) by using the IIf function as follows:

Dim i as Integer? = 1
Dim result as String
' C# '?' equivalent
IIf(i > 1, result = "i is greater than one", result = "i is one or less")
' Or C# '??' equivalent
IIf(i is nothing, result = "i is null!", result = "i is a number")
Read more about Dave Radley on

Related to VB equivalent of the C# ? operator

Eclipse Mining

A mine planning, tracking, QC and reporting package. Used at gold mines in Ghana, Cote d’Ivoire, Eritrea and soon many others.

EMail marketing done properly

We've worked hard over the last few months to create a tool which can be used for creating and managing your email marketing campaigns. This feature packed set of tools will help us help you make the most of your existing customers and maximise your revenue.

Mapping as a sales tool

Google has said that the next step in Search is to put all the information onto a Map. The power of being able to show complex data within a geographic display, is that it makes it instantly comprehensibility.

Knowledge Base

Data for Microsoft Power Bi

With the amount of data available to you growing exponentially, we're here to help you make sense of it all. There are now many business intelligence tools available from companies such as Microsoft, Google and Tableau but you'll need experts in data analysis if you want to make sense of it. That's where we fit in.

Eclipse EMail PowerBI Reporting Example

Eclipse EMail is available to all organisations, regardless of whether or they already exist as clients of TheDevTeam. Integrate your email services with all your other business data. Well structured, targeted campaigns can be finely tuned and developed as you learn to interpret the wealth of information that's generated as a result.

PowerBI digger production example using Eclipse

There are literally thousands of different types of reports you can extract from our mining production tracking system: Eclipse Miningware. This article is a brief demonstration of just one; a daily report for the diggers which worked in production "yesterday".

Software Development Skills

Productivity in software development has improved even faster than the hardware - Moore's Law - double the power every 18 months.

The Dev Team
8 The Lawn,
St Leonards-On-Sea,
East Sussex, TN38 0HH