|
Try the following
<br />
Assembly1.MyClass class1 = new Assembly1.MyClass();<br />
Assembly2.MyClass class2 = new Assembly2.MyClass();<br />
If you fully qualify your references to the namespaces you should be fine.
Kev Pearman MCP
|
|
|
|
|
Lol those are the assembly names, not the namespaces. He mentions both reside in the same namespace, called MyNamespace.
top secret xacc-ide 0.0.1
|
|
|
|
|
:-ODoh! Now i feel stupid!
Kev Pearman MCP
|
|
|
|
|
|
The posts are all yours now, dinner times over so i gotta get back to it
Kev Pearman MCP
|
|
|
|
|
Do you want to use them as the same class? Then you are out of luck!
Do you want to just reference them? Then redesign your classes and let them at least half decent/different names.
If you really wanna use them like that, they way you explain, you will have to resort to reflection as the C# compiler cannot handle such ambiguities.
top secret xacc-ide 0.0.1
|
|
|
|
|
I just wanted to try if there is a way to do that. But you are right. In my case I just can't change the classes at all. It seems that I will have to write a small application to use the other version.
Thanks again.
|
|
|
|
|
Hi, guys. I set the control textBox as Multiline true. And I want change the text line with such way"Contents.\n in the box". But "\n" didn't change a new line instead of displaying an error character. What 's the reson? And how can I can realize changing a new in my code?
Thanks a lot
vigorous
|
|
|
|
|
wk_vigorous wrote:
And I want change the text line with such way"Contents.\n in the box". But "\n" didn't change a new line instead of displaying an error character.
Try \n\r
wk_vigorous wrote:
And how can I can realize changing a new in my code?
That makes no sense. If you want to find out when the text changes, you can handle the TextChanged event.
Aaron Eldreth
TheCollective4.com
My Articles
While much is too strange to be believed,
Nothing is too strange to have happened.
- T. Hardy
|
|
|
|
|
Try \r\n , please.
I used \n\r before , but it didn't change.
I don't know the cause.
hello ALL..^^
|
|
|
|
|
Hy everyone!
I do want to overide the red cross for closing in my Windows.Form.
I managed to do so by using e.Cancel=false in my code but well then it cancels every closecommand, meaning it cancels my command for closing via a button or via the menuitem of my trayicon.
Well what I want to do is:
If the user clicks the read cross (WinXP Style!) then the minimize operation is called. If the user clicks the button "Close" (on my Form) the the application is quit and if the user selects "Close" from my contextmenu of the trayicon then the application quits as well.
But well how do I separate these three events, so the last two really close my application and the first one minimizes?
Thanks!
Stephan.
|
|
|
|
|
Stephan, in the button.click event use Application.Exit() instead of MyForm.Close()
Kev Pearman MCP
|
|
|
|
|
Thanks!
It works!
Stephan.
|
|
|
|
|
|
Hi,
I've defined an attribute type which is used on classes. I've written code that loads an assembly, iterates all the types defined in the assembly and search for types that have that attribute. This all works fine and in the debugger i can see that it is finding the attribute on the class. However I can't cast it from a generic System.Attribute to my own custom attribute type.
If I use the Type.GetCustomAttributes overload that takes an attribute type as an argument and pass it my custom attribute type it doesn't find any.
The debugger shows the attributes that I'm finding as being my custom type when i call GetCustomAttributes with no type.
Any ideas?
Code snippet:
attributes = type.GetCustomAttributes(false);
if(attributes.Length != 0)
{ // check to see if it's what we are after
foreach(System.Attribute attribute in attributes)
{
Transformer transformer = attribute as Transformer;
if(transformer != null)
transformers.Add(new DataTransformer(transformer.ID,transformer.DisplayName,transformer.FileExtension,assembly,type));
}
}
any explicit casts also fail. Transformer is my custom attribute type and the debugger shows the attribute to be of that type.
|
|
|
|
|
Hi,
I'm currently developing an application which uses some pretty old data-files. My problem is, that the floats are stored in the old microsoft binary format.
After I spend my weekend trying to figure out how to get them to the IEEE-format and vice versa, I'm now just about to give up... maybe some over here can have a look at it and give me some hint.
Here is a conversion-routine between both of them, written in c++. As I never did anything in c++, I was unable to convert it to a c++.net class and use that one in my c#-project. I would even be happy with an dll, as long as I'm able to convert the floats.
http://outer-court.com/basic/echo/T887.HTM
Thanks,
Dennis
|
|
|
|
|
Hi Gurus!
I got an ASP.NET web project, in C# and I want to make some sub systems in my project security for example) into assembly dll in C#. Is it possible? And what is the best way to do it? Should I start new project as dll and copy-paste my code into it?
xedom developers team
|
|
|
|
|
hi,
this is my small suggection. Before getting into creating .dll. better be very clear about the security and level of access of your asp.net logics.
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
Well actually I createde a Library project, add existing web page (aspx&cs files) and sucessfully compiled it. But when in other test project I add reference an my dll and just inherits my page from page that is in dll the following exception occurs:
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object
this occurs in
public void InitializeComponent()
{
of the page dll class. Can you answer mr what happpens?
xedom developers team
|
|
|
|
|
hi,
i am confused. plese little bit more explanation ...
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
|
hi,
Ok. that is good. please share it to others through this forum.;)
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
Hy everyone!
When I do clone menues do I clone them as a whole meaning, the Menu, the Items and the actions which they did or do I only clone the items?
Because what I want to do is cloning an existing menu and adding some new items to the cloned menu. But I am not sure if cloning only creates a copy of the menu without the actions or with them.
I only found examples describing cloning the items but there were no infos available if the actions were also cloned.
Thanks!
Stephan.
|
|
|
|
|
hi,
i can give a small hit. If you took the methods
MergeMenu() -> This will merges another menu's items with this one's as specified by these mergeType and mergeorder properties. This method is used to merge an MDI continer's menu with that of its active child.
CloneMenu() -> This will create a deep copy of another menu.
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
Dear all,
i want to resize my form on runtime whenever monitor resulation change.
forexample my application is running on 800*600 and then i change it on 1024*768 at this time i want to resize my controls. For this i try form's Resize event but it is not working.
i hve also read last discussion on forum in this regard.
so kindly tell me on what event and the short way to handle this problem.
thnks in advance.
farukhalifarooq
|
|
|
|