Click here to Skip to main content
15,887,336 members
Home / Discussions / C#
   

C#

 
QuestionRe: how to have Pin
jojoba201113-Mar-14 23:23
jojoba201113-Mar-14 23:23 
AnswerRe: how to have Pin
Eddy Vluggen13-Mar-14 23:30
professionalEddy Vluggen13-Mar-14 23:30 
AnswerRe: how to have Pin
Pete O'Hanlon13-Mar-14 23:57
mvePete O'Hanlon13-Mar-14 23:57 
AnswerRe: how to have Pin
Ravi Bhavnani14-Mar-14 6:41
professionalRavi Bhavnani14-Mar-14 6:41 
QuestionHelp Please Pin
Member 1045276713-Mar-14 10:38
Member 1045276713-Mar-14 10:38 
AnswerRe: Help Please Pin
Richard Andrew x6413-Mar-14 11:33
professionalRichard Andrew x6413-Mar-14 11:33 
GeneralRe: Help Please Pin
Member 1045276713-Mar-14 23:35
Member 1045276713-Mar-14 23:35 
QuestionDLL Existance Test Pin
Stephen Wickland13-Mar-14 8:08
Stephen Wickland13-Mar-14 8:08 
Hello,

I have a DLL that is a linked reference in my C# project. I would like to test for its existance before opening my form using something like "File.Exists()". I cannot find a place in my program to put the file test before an exception is thrown when the DLL is missing.

The following code works if the DLL resides in the directory with the EXE. If the DLL is missing an exception is thrown.

static void Main()
{
string message_out = (File.Exists(USBClassLibrary.dll) ? "DLL found." : "DLL missing");
MessageBox.Show(message_out);

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}

I thought that referenced DLLs were loaded on demand so I am puzzled by this error.

Thanks,
SMW
AnswerRe: DLL Existance Test Pin
Eddy Vluggen13-Mar-14 8:39
professionalEddy Vluggen13-Mar-14 8:39 
GeneralRe: DLL Existance Test Pin
Stephen Wickland13-Mar-14 9:25
Stephen Wickland13-Mar-14 9:25 
AnswerRe: DLL Existance Test Pin
Abhinav S15-Mar-14 21:35
Abhinav S15-Mar-14 21:35 
QuestionRead Excel C# windows form using OleDB Connection Pin
Zeyad Jalil12-Mar-14 23:08
professionalZeyad Jalil12-Mar-14 23:08 
AnswerRe: Read Excel C# windows form using OleDB Connection Pin
Bernhard Hiller13-Mar-14 1:10
Bernhard Hiller13-Mar-14 1:10 
GeneralRe: Read Excel C# windows form using OleDB Connection Pin
Zeyad Jalil13-Mar-14 1:56
professionalZeyad Jalil13-Mar-14 1:56 
AnswerRe: Read Excel C# windows form using OleDB Connection Pin
Richard MacCutchan13-Mar-14 2:20
mveRichard MacCutchan13-Mar-14 2:20 
GeneralRe: Read Excel C# windows form using OleDB Connection Pin
Zeyad Jalil13-Mar-14 2:26
professionalZeyad Jalil13-Mar-14 2:26 
GeneralRe: Read Excel C# windows form using OleDB Connection Pin
Richard MacCutchan13-Mar-14 2:44
mveRichard MacCutchan13-Mar-14 2:44 
AnswerRe: Read Excel C# windows form using OleDB Connection Pin
OriginalGriff13-Mar-14 2:59
mveOriginalGriff13-Mar-14 2:59 
GeneralRe: Read Excel C# windows form using OleDB Connection Pin
Eddy Vluggen13-Mar-14 3:59
professionalEddy Vluggen13-Mar-14 3:59 
GeneralRe: Read Excel C# windows form using OleDB Connection Pin
OriginalGriff13-Mar-14 4:51
mveOriginalGriff13-Mar-14 4:51 
QuestionCalling through modem to mobile phone Pin
Akshay41112-Mar-14 1:43
Akshay41112-Mar-14 1:43 
AnswerRe: Calling through modem to mobile phone Pin
jschell12-Mar-14 11:14
jschell12-Mar-14 11:14 
QuestionSend info from XNA-game Pin
larsp77711-Mar-14 22:47
larsp77711-Mar-14 22:47 
SuggestionRe: Send info from XNA-game Pin
Richard MacCutchan11-Mar-14 23:01
mveRichard MacCutchan11-Mar-14 23:01 
GeneralRe: Send info from XNA-game Pin
larsp77711-Mar-14 23:29
larsp77711-Mar-14 23:29 

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.