|
Specifically, either using the OLE DB driver for Excel (using the System.Data.OleDb namespace classes), or the ODBC driver for Excel (download ODBC.NET from Microsoft).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I have this 3rd part DLL that when viewing in the Object Browser, the Class that I want to work with it public [public class PublicClass : System.Object].
When I set an object to the class [PublicClass myPublicClass = new PublicClass] I get the Compiler Error CS0122 [Class is inaccessible due to its protection level]
What seems to be the problem? Any help would be great.
Thx
|
|
|
|
|
A couple things come to mind:- While the class is public, the default constructor might not be (or whatever constructor you're using). If you don't specify a default constructor, it is inherited (access modifier and all) from its parent. In your case,
System.Object already has a public default constructor so you're class will inherit that unless overridden. - You may have a type name clash, and the compiler is choosing one over the other. It usually spits out warnings or errors, but who knows sometimes. Make sure you don't have a similarily named class from another imported namespace
Most likely, the problem is #1 above. The documentation for the C# compiler error CS0122 affirms such.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
If its a nested class it inherits the enclosing type accessablity. The same rules that are valid for type members are valid for nested types to.
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
need to create a keyboard accelerator that works in c++ with the dev c++ compiler =)
|
|
|
|
|
And you're posting this in the C# forum why? No wonder you can't figure out a trivial task using the resource editor (hint).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
plz anyone can give me a sourcecode for this? plz plz plz
|
|
|
|
|
Did you actually try searching this site first? There's tons of examples. And besides, this is too lengthy of an answer to provide in the forums - especially to just hand-out code (from which you learn nothing). Please try searching first. This search returned many hits, had you only tried: http://www.codeproject.com/info/search.asp?cats=3&cats=4&cats=5&searchkw=C%23+graphs[^]
Researching problems is a major part of any development project, no matter how great or how small.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Or you could also look here:
C# graph code
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Christian Graus wrote:
C# graph code
That's even worse than John Simmons link.
-Nick Parker
DeveloperNotes.com
|
|
|
|
|
Three posts in three days, all from new accounts, all who have posted only one question - the same question. Give me a break.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Enlighten me, Nick!
As for Christian's link, I'll definitely be waiting to pounce on Bjarke with that one at work!
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
|
Yeah, Christian's is much better!
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
That's the damn funniest thing I've seen / heard in weeks - even more than my MIS cracks I dish-out to Nick Parker! I definitely have to remember that...
I agree with your sentiments entirely (and your more-than-adequate comments are much shorter than my jabs - I guess I should take note...and use that very same link).
People who post such blatently stupid questions don't even bother to google the 'net or search CP, it's no suprise they don't search the SDK documentation (.NET, Platform SDK, whatever). Too many people in this field think the ability to write "hello, world" apps makes them a developer!
Thanks for the hilarious link! I'll be sure to throw that one in after I'm tired of stupid questions, too.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Heath Stewart wrote:
even more than my MIS cracks I dish-out to Nick Parker!
You have to stop grouping me with the other M.I.S. students that work there.
-Nick Parker
DeveloperNotes.com
|
|
|
|
|
Heath Stewart wrote:
People who post such blatently stupid questions don't even bother to google the 'net or search CP,
Especially as when we needed something similar we found a freeware library in minutes with google !!!
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
|
Well, I unfortunately don't have the book (although I am currently keeping watch for one for under $15 on Ebay), so I'm not that familiar with its contents. I've looked at the TOC on Amazon.com, though.
But I'll let you know if I find something that needs coverage that I don't think you've covered.
|
|
|
|
|
|
Why does your name sound sooo familiar???
/\ |_ E X E GG
|
|
|
|
|
|
|
|
Tom,
I just read your reply, however I have not received a notification yet via email that a reply was posted. I'll keep watching in case it just hasn't passed through all the wires yet.
-Nick Parker
DeveloperNotes.com
|
|
|
|