Click here to Skip to main content
16,012,508 members
Home / Discussions / C#
   

C#

 
GeneralNeed help with C# to C++ DLL interaction Pin
lms00727-Jan-05 0:55
lms00727-Jan-05 0:55 
GeneralRe: Need help with C# to C++ DLL interaction Pin
lms00727-Jan-05 1:53
lms00727-Jan-05 1:53 
GeneralRe: Need help with C# to C++ DLL interaction Pin
lms00727-Jan-05 2:17
lms00727-Jan-05 2:17 
GeneralNo overload for method Pin
nikneem200526-Jan-05 23:15
nikneem200526-Jan-05 23:15 
GeneralRe: No overload for method Pin
Stefan Troschuetz26-Jan-05 23:39
Stefan Troschuetz26-Jan-05 23:39 
GeneralRe: No overload for method Pin
J4amieC27-Jan-05 0:08
J4amieC27-Jan-05 0:08 
GeneralRe: No overload for method Pin
nikneem200527-Jan-05 0:19
nikneem200527-Jan-05 0:19 
GeneralRe: No overload for method Pin
J4amieC27-Jan-05 0:03
J4amieC27-Jan-05 0:03 
nikneem2005 wrote:
I cannot find what's really meant here

Sorry to state the obvious, but what is really meant is what it really says. The "Method" you are calling is actually a constructor (similar in signiture to a method). As the error states, there is no constructor which takes one parameter (argument).

You can confirm this by opening object browser in VS, navigating to system.data.sqlclient.SqlException - it has NO public constructors at all. The most likely reason for this is that SqlException was not intended to be used by client code. A quick look with .NET reflector confirms there is a serialization constructor on this object only.

Now, to answer your question, create your own exception, inheriting from System.ApplicationException, and throw this instead. Something like "ConfigurationException" would be relevant in this case and could be reused anytime where the app is not configured correctly.
GeneralSecurity error - windows custom control Pin
26-Jan-05 23:00
suss26-Jan-05 23:00 
GeneralConnection pooling in windows.net Pin
sapnabn26-Jan-05 22:59
sapnabn26-Jan-05 22:59 
GeneralRe: Connection pooling in windows.net Pin
Member 37818926-Jan-05 23:07
Member 37818926-Jan-05 23:07 
GeneralCapturing Video Pin
Deobrat Singh26-Jan-05 22:43
Deobrat Singh26-Jan-05 22:43 
GeneralServicedComponent object in server process Pin
kianboo26-Jan-05 21:27
kianboo26-Jan-05 21:27 
GeneralWindows login Pin
sharathgowda26-Jan-05 20:14
sharathgowda26-Jan-05 20:14 
GeneralRe: Windows login Pin
26-Jan-05 21:34
suss26-Jan-05 21:34 
GeneralRe: Windows login Pin
sharathgowda27-Jan-05 0:58
sharathgowda27-Jan-05 0:58 
GeneralRe: Windows login Pin
Dave Kreskowiak27-Jan-05 4:18
mveDave Kreskowiak27-Jan-05 4:18 
GeneralUpdating a database from a complex DataSet Pin
Luis Alonso Ramos26-Jan-05 18:11
Luis Alonso Ramos26-Jan-05 18:11 
Generalusing wsdl.exe to generate webservice server and proxy Pin
rana7426-Jan-05 16:36
rana7426-Jan-05 16:36 
Generalaccessing variables Pin
John L. DeVito26-Jan-05 14:05
professionalJohn L. DeVito26-Jan-05 14:05 
GeneralRe: accessing variables Pin
Heath Stewart26-Jan-05 14:22
protectorHeath Stewart26-Jan-05 14:22 
GeneralCustom Column Style (Windows Forms) Pin
epinaud26-Jan-05 10:14
epinaud26-Jan-05 10:14 
GeneralRe: Custom Column Style (Windows Forms) Pin
Heath Stewart26-Jan-05 14:35
protectorHeath Stewart26-Jan-05 14:35 
GeneralProgramming crystal reportsss Pin
primomak26-Jan-05 9:39
primomak26-Jan-05 9:39 
GeneralAdding assemblies to the GAC Pin
thepersonof26-Jan-05 8:27
thepersonof26-Jan-05 8:27 

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.