|
Yes, AFAIK all parts of an application should have the same .NET version: a single process
can not access parts of different framework versions.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Ok...but still Not able to find out what might be the cause
Regards,
Pavas
|
|
|
|
|
I have a program that was designed in Visual Studio 2005 and I had to modify the source code.
It was written with Visual Basic as the language and .Net
All I have is this VWD Express 2005. I need to do a build and to create an installer file. Is there a way to do this? What if I use Visual Basic and .Net?
Any way to use the VWD Express to do this?
Is there some third party solution?
Any advice would be greatly appreciated
Jeffrey A. Solochek
|
|
|
|
|
On startup I want to trigger the follow event manually to update whats displayed because the user has not selected anything in the combo box yet. So I want to make a default selection in the combo box if the Items member contains at least one item.
The code it executes only needs to be in this function, is calling it directly the best/only way to do this? Or is there another way to send trigger this message? Setting the SelectionIndex changes whats displayed in the combo box, but other things need to happen when that selection changes.
<br />
private: System::Void comboBoxList_SelectionChangeCommitted(System::Object^ sender, System::EventArgs^ e)<br />
{<br />
}<br />
|
|
|
|
|
Hi,
IMO you could select programmatically, so your handler would be called automatically.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
how can I see the interbal details of an assembly ( dll or exe)
I tried in notepad…
Do we have any method to list out the methods in an assembly?
My small attempt...
|
|
|
|
|
|
Hello
We have a base class (A1) with derived classes (A2).
The base class has a collection of another class (X1).
Class X1 also is the base class for a few other classes (X2).
We know that the only type of X objects that will exist in A2 are types X2.
Currently X1 returns the list of A1
As X2 is derived from X1 it also exposes the list of A1
So when looping through this collection in A2 each object needs to be cast to type X2
What we are after is a method to avoid this casting
We cant use override as the return type doesnt match x1
We cant use new as it is not possible to cast the underlying collection to List<x2>
Weve tried many other ideas none of which have helped
Is there any suggestions about what we could try?
Or do we have to always cast the X1 objects to X2.
The code is along the lines of
<br />
public class X1 {<br />
public string propQ;<br />
public string propW;<br />
}<br />
<br />
public class X2 : X1 {<br />
public string propE;<br />
public string propR;<br />
}<br />
<br />
public class A1 {<br />
public string prop1 {<br />
get {return _prop1;}<br />
set {_prop1 = value;}<br />
}<br />
protected string _prop1 = "";<br />
<br />
public List<x1> colOfX {<br />
get {return _x;}<br />
}<br />
protected List<x1> _x = new List<x1>();<br />
}<br />
<br />
public class A2 : A1 {<br />
public string prop2 {<br />
get {<br />
return "";<br />
}<br />
set {<br />
}<br />
}<br />
<br />
<br />
}<br />
</x2></x2></x2></x1></x1></x1>
BTW: Apologies for the crap class/property names
|
|
|
|
|
Are you using generics? (the <> don't show up, you have to use the buttons at the bottom of the text editor). If you're not, try generics.
You could make the base classes member an IList instead, and only instantiate it in the subclass. Then you won't have a problem with the cast because you can cast any generic List to an IList.
Simon
|
|
|
|
|
Thanks Simon,
We are using generics, should of checked the preview a bit harder.
We did look into using the generics IList interface, also inheriting directly from generic List. We did this is X class.
Both cases we still came across issues with either casting List<X1> to List<X2> or returning the incorrect return parameter in the sub class. We also tried exposing the List as a generic type in the colOfX property but this just meant the decision about the list type was made in the code implementing the object, which is what we tried to avoid in the first place.
Was this what you were suggesting or have i missed the point?
|
|
|
|
|
Just curious... has anyone ever bothered catching it?
|
|
|
|
|
Yes you can actually try to create an out of memory error so you can catch it. However in normal development practices it would more likely fall into a general catch(Exception).
led mike
|
|
|
|
|
Yes, it does not always signify what the name implies. Have a look at Image.FromFile()
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
If the file does not have a valid image format or if GDI+ does not support the pixel format of the file, this method throws an OutOfMemoryException exception.
Uhh.... wow.
Gotta love the WinForms team, total hack as always
|
|
|
|
|
reinux wrote: Gotta love the WinForms team, total hack as always
Then publish your own own base class library that would be so much better than theirs, or shut the f*** up.
led mike
|
|
|
|
|
Wtf is your problem?
There's a reason I don't use WinForms anymore, and it's because someone already did publish their own UI toolkit for .NET that's so much better, and it's called WPF.
|
|
|
|
|
reinux wrote: Wtf is your problem?
My bad. Confused you with someone else with a similar CP name, I should have checked first.
led mike
|
|
|
|
|
reinux wrote: someone already did publish their own UI toolkit for .NET that's so much better, and it's called WPF
That's debatable. There's so much functionality missing and it's buggy.
|
|
|
|
|
Hi all,
When I try to run the (C#)project FileSyswatcher on Visual Express 2008 then it gived an error .
saying the windows service failed to start .. first install installutil.exe and then start service ServerExplorer ,Windows Sevice Administrator ..
Can any one help me regarding this project problem ..??
Thanks ..
|
|
|
|
|
rajesh.tycoon wrote: Can any one help me regarding this project problem ..??
Probably not with the information you provided. There might be an article on MSDN that talks about common problems with Windows Services. I would try using Google to find it, it could help you.
led mike
|
|
|
|
|
Hi,
I have a server-client application and I would like to adapt the client so that it can work alone in "Demo mode": instead of making petition to the server, it would get the data from files (that contains data captured listening to the client-server communication).
I have a wsdl which i use to create csharp classes (using the wsdl commnand-line tool). The messages are XML-SOAP.
I can't manage to deserialize the captured messages easily. I'm sure there is a method in SoapHttpClientProtocol that allows to do it. Anyone has an idea?
|
|
|
|
|
lverre wrote: I'm sure there is a method in SoapHttpClientProtocol that allows to do it.
You don't know, but you are sure. hehe Ok, good luck
led mike
|
|
|
|
|
Hi,
I have an XML file that contains 2 projects to build, but there is no strong name key file for signing them,is there any way to specify a strong name key file in that XML file so that when MSBuild builds those project then that should sign projects with that key.
Regards,
Mushq
|
|
|
|
|
|
Hi,
I have a web service I created and uploaded to my server. In another project (output type .dll) I added a reference to the service via "Add Web Reference..." dialog. All seemed fine at first. A file called Reference.cs is added under the web reference node, and when I look at it, this looks just like the proxy class that is needed. The Build Action associated with this file is "Compile." I am also able to use intellisense to get access to the created proxy class, and when I load the .dll from another project in the same solution through the debugger, everything works fine.
However, when I copy the files from my bin\Release\ to another folder (and also calling the .dll from a separate solution altogether), I get an exception :
"System.TypeLoadException: Could not load type 'Trading.BrokerProxy.net.sbjgroup.CustomerMgmtSvc' from assembly 'SBJCharts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'..."
(where Trading.BrokerProxy.net.sbjgroup.CustomerMgmtSvc is the proxy class)
The other part of all of this, is that if I generate the proxy class via wsdl.exe and add the output to my project...at that point all works as expected (after I also remove the WebReference).
I'd really like to figure out what's going on here, as it would be much simpler just to add the WebReference and then everything works as expected.
Thanks in advance.
BW
|
|
|
|