|
In short, you won't be able to get EType from project B, because it's in project A. If B -> A and C -> B, then why can't C -> A? Project A is going to be required for C to run anyway, if it references B (because B requires A).
You could create a new enum type in B that derives from EType (as your forum post suggests), but you will still need a reference to A in C (because it will need to know the inherited enumerations).
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Thank you very much for your fast reply!
So if B has the ClassB with a method like this:
public class ClassB<br />
{<br />
...<br />
public void MethodB(A.EType myType)<br />
{<br />
...<br />
}<br />
}
and I call it in projectC in this way:
B.ClassB bClass = new B.ClassB();<br />
bClass.MethodB(myNewType);
have I to define necessary myNewType as A.EType (and so I have to reference the projectA in my projectC), or is there a trick to avoid it?
|
|
|
|
|
No, you'll have to reference A. Keep in mind that A would be required to load and use B anyway. So if C references B, then you would need to ship A, B, and C in order to use C.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Thank you, Tom
|
|
|
|
|
Errr...
I only supposed that I partially understand your question.
But, after referred to others' posts, I guess what you were trying to do was merely certain issues of "namespace" that you misunderstood.
In general, a .NET namespace provides a way to encapsulate your classes, delegates, structures, enumerations etc. Meaning, anything you create or implement ought to ultimately exist in namespaces. In such a manner, a project doesn't really suggest an individual object which you can reference to; it merely groups whatever namespaces needed and manipulate the members existing in a pre-defined sequence.
Thus, for your question, you define a public enumeration in project A which subsequently defines "namespace A"; in order to make use of the enumeration, you have to reference the "namespace A" in whatever post projects you create.
Hope it's helpful.
Ray
-- modified at 22:51 Thursday 15th November, 2007
-- modified at 22:52 Thursday 15th November, 2007
Someone was born greatness;
Someone achieved greatness;
Someone have the greatness thrust upon him;
|
|
|
|
|
You may want to reply to devzav, so he gets notified of your reply.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Surely.
Hee, Hee.
Someone was born greatness;
Someone achieved greatness;
Someone have the greatness thrust upon him;
|
|
|
|
|
Thank you for your answer
|
|
|
|
|
devzav wrote: I created another class (Class2) that wrap the first class.
What do you mean by 'wrap'? Does Class2 inherit from Class1? Please try and use the proper terminology when posting questions, otherwise no one will understand what you are talking about.
If you are using inheritance and your enum in Class1 is a public member of this class, you should be able to access it as a member of Class2 from a class that references Class2.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hello,
i have created WindowsApplication, and i want to add MS Access database file to it. I am configuring Data Source COnfiguration Wizard, and on the last step when i must choose objects for my dataset i get an error "Some updating commands could not be generated automatically.The database returned the following error: Dynamic SQL generation is not supported against a SelectCommand that does not return any base table information."
when i press OK, i get the following message:
Could not retreive schema information for table or view PersonTable.
where could be the problem? thanks in advance
|
|
|
|
|
can anyone help me with this or no?
one thing which i noticed is, when i tried to do the above procedures on my Home PC everything was just Fine! and i used the same C# express downloaded from internet, and same database file. but at my job PC i have this problem... what do u think? what is the reason?
|
|
|
|
|
Hi. In my windows form, there is a button control.
When i click on it, just removing the controls from window and adding progressbar dynamically to the window. It working fine and progress bar appearing nice.
At the same time, i am adding Label control to form at runtime only. But it appearing last(i.e after completion of process of progressbar).
Why it wont appear on window first...
in code i added label to form first and then progressbar
can any one give idea reg this.........
G. Satish
|
|
|
|
|
Windows execute the code in message queue.
So after the label display you have to use
Application.DoEvents();
Hope this help.
Regards
Pankaj Joshi
|
|
|
|
|
Thank U for giving solution.
Another one, i want to add label dynamically.
How to set size and font family to that label?
G. Satish
|
|
|
|
|
Sorry this time
This is graphics related issue I suppose. I can't help it out.
Regards
Pankaj Joshi
|
|
|
|
|
Hi!
Simply take a look at the Label.Font property. That wasn't hard, was it?
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
hi, i am sending Bulk mails to users by getting mailid's from text file.
But i want to put the mails in queue..bcz after sending nearly 1000 mails. it getting error as...
Remote host forcibly disconnected...etc
can any one has idea reg this. How can put the mails in Queue?????
G.Satish
|
|
|
|
|
I think 1000 mails are more than enough
Regards
Pankaj Joshi
|
|
|
|
|
Hello All,
I am using a reportviewer control in my application.In order to show a report in this control i have used the getreportdefinition and loadreportdefinition methods of the Reportservice2005. It works fine on my local machine but when i try to access it through a network machine i get a error Permissions insufficient for user "Domain\username" can any one help me out.....
|
|
|
|
|
Hi all,
In my project i am reading a binary file of 81MB size and this information need to be inserted in to different tables of database.
The binary file is having several sections, contains some millions of records. while reading the binray information i am conveting the bytes in to c# datatypes and saving in arraylist, finally i am inserting in to the database Which is taking huge amount of time.
to insert this 81 MB size file in to database my application is taking 30 min.
Can any one suggest me how can i optimize the performance?
Thanks in advance
|
|
|
|
|
|
Sorry, previously what i given response is wrong. ignore it
satish......
|
|
|
|
|
Hard to say.
There are a lot of ways to boost performance.
- Is the algorithm optimized? Are your for loops ok? (you don't perform actions in for loops that could be done outside eg.)
- Do you have GUI updates like a progress bar or something?
- Try an Ngen compilation, it might help (See MSDN)
- Can you use threads? eg Read in a block of bytes and while the DB updates, Read the next block at the same time etc...
- Did you use optimezed objects? (StringBuilder for string concatination eg.)
Hope this helps...
V.
If I don't see you in this world, I'll see you in the next one... And don't be late. (Jimi Hendrix)
|
|
|
|
|
Hi,
You are use following tips/suggestions/whatever
1. Dont use INSERT when "LOADING" the data, use BULK INSERT
2. You can convert the data into c# format, and dump it as required in some temporary file, and bulk insert data using that file. If you are good at threading, you can boost the performance considerably.
3. If you are comfortable with Dynamic SQL, use it after converting data to c# datatypes.
And if you are good in threading and dynamic SQL then you can have a boost in performance as "complete loading of a 45 GigaBytes of data to 12 tables in 1.5 hours". That is what i experienced once!
Hope that much performance is enough for now and you find it useful!
Regards,
Adeel
Do rate the reply, if it helps or even if it doesnot, because it helps the members to know, what solved the issue. Thanks.
|
|
|
|
|
Just for information, are you developing data warehouse?
Do rate the reply, if it helps or even if it doesnot, because it helps the members to know, what solved the issue. Thanks.
|
|
|
|