Click here to Skip to main content
16,007,885 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How to check if user doesn't select anything in combobox. Pin
Richard Andrew x642-Mar-18 1:47
professionalRichard Andrew x642-Mar-18 1:47 
AnswerRe: How to check if user doesn't select anything in combobox. Pin
Alan Burkhart2-Mar-18 6:26
Alan Burkhart2-Mar-18 6:26 
QuestionInvocar StatusStrip desde otro form Pin
Edgardo Martinez26-Feb-18 13:35
Edgardo Martinez26-Feb-18 13:35 
AnswerRe: Invocar StatusStrip desde otro form Pin
Eddy Vluggen27-Feb-18 3:10
professionalEddy Vluggen27-Feb-18 3:10 
QuestionGet Databack from combobox. Pin
hmanhha26-Feb-18 7:30
hmanhha26-Feb-18 7:30 
AnswerRe: Get Databack from combobox. Pin
Richard Deeming26-Feb-18 7:42
mveRichard Deeming26-Feb-18 7:42 
AnswerRe: Get Databack from combobox. Pin
Member 834559927-Feb-18 3:56
Member 834559927-Feb-18 3:56 
GeneralRe: Get Databack from combobox. Pin
Dave Kreskowiak27-Feb-18 5:35
mveDave Kreskowiak27-Feb-18 5:35 
SuggestionRe: Get Databack from combobox. Pin
Richard Deeming27-Feb-18 6:31
mveRichard Deeming27-Feb-18 6:31 
QuestionFatal error encountered during command execution Pin
duhoky26-Feb-18 1:14
duhoky26-Feb-18 1:14 
GeneralRe: Fatal error encountered during command execution Pin
Richard MacCutchan26-Feb-18 1:35
mveRichard MacCutchan26-Feb-18 1:35 
AnswerRe: Fatal error encountered during command execution Pin
duhoky26-Feb-18 1:51
duhoky26-Feb-18 1:51 
QuestionI am trying to port this code from VBScript to C# Pin
Steve Messer25-Feb-18 14:48
Steve Messer25-Feb-18 14:48 
AnswerRe: I am trying to port this code from VBScript to C# Pin
Dave Kreskowiak25-Feb-18 16:05
mveDave Kreskowiak25-Feb-18 16:05 
In VBScript, if a function returns an instance of a class or any object, you have to SET the variable to that instance.

Also, "On Error Resume Next" is error handling, which would be a try/catch block in C#. Resume Next just tells VB to continue executing code even if an error occurs. It also sets the values of the Err object if an error does occur.

Basically, all that code boils down to this in C#:
C#
var zGetFolder = new DirectoryInfo(sFolder);

You can find the documentation on the DirectoryInfo class here[^].

GeneralRe: I am trying to port this code from VBScript to C# Pin
Steve Messer25-Feb-18 18:18
Steve Messer25-Feb-18 18:18 
GeneralRe: I am trying to port this code from VBScript to C# Pin
Mycroft Holmes25-Feb-18 20:27
professionalMycroft Holmes25-Feb-18 20:27 
GeneralRe: I am trying to port this code from VBScript to C# Pin
Richard MacCutchan25-Feb-18 22:09
mveRichard MacCutchan25-Feb-18 22:09 
AnswerRe: I am trying to port this code from VBScript to C# Pin
Ralf Meier25-Feb-18 22:25
mveRalf Meier25-Feb-18 22:25 
GeneralRe: I am trying to port this code from VBScript to C# Pin
Dave Kreskowiak26-Feb-18 2:21
mveDave Kreskowiak26-Feb-18 2:21 
GeneralRe: I am trying to port this code from VBScript to C# Pin
Steve Messer26-Feb-18 5:47
Steve Messer26-Feb-18 5:47 
GeneralRe: I am trying to port this code from VBScript to C# Pin
Richard Deeming26-Feb-18 6:20
mveRichard Deeming26-Feb-18 6:20 
GeneralRe: I am trying to port this code from VBScript to C# Pin
Steve Messer26-Feb-18 9:57
Steve Messer26-Feb-18 9:57 
SuggestionRe: I am trying to port this code from VBScript to C# Pin
Richard Deeming26-Feb-18 1:35
mveRichard Deeming26-Feb-18 1:35 
GeneralRe: I am trying to port this code from VBScript to C# Pin
Dave Kreskowiak26-Feb-18 2:20
mveDave Kreskowiak26-Feb-18 2:20 
AnswerRe: I am trying to port this code from VBScript to C# Pin
oblondel7-Mar-18 3:16
oblondel7-Mar-18 3:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.