VB.NET-Äquivalent von C # "As"
Was ist das äquivalent in VB.NET der C# - Als Schlüsselwort, wie im folgenden?
var x = y as String;
if (x == null) ...
InformationsquelleAutor der Frage JoelFan | 2010-03-15
Du musst angemeldet sein, um einen Kommentar abzugeben.
Ist es TryCast:
InformationsquelleAutor der Antwort Hans Passant
Trycast ist, was Sie suchen.
InformationsquelleAutor der Antwort Morten Anderson
TryCast:
InformationsquelleAutor der Antwort Guffa
Dim x = TryCast(y, [String])
InformationsquelleAutor der Antwort Oskar Kjellin
Hier gehen Sie:
C# - code:
VB.NET äquivalent:
InformationsquelleAutor der Antwort Alex Essilfie
Aus: http://www.developerfusion.com/tools/convert/csharp-to-vb/
InformationsquelleAutor der Antwort Dustin Laine
Können Sie es mit
?
:Es ermöglicht Ihnen die Verwaltung von null-Werte zulässt ohne
if
🙂InformationsquelleAutor der Antwort evanboissonnot