|
I have an EXE (and not the source code).
And the EXE have a dll as reference to it?
Now I have another version of same dll (same name)
How to make the Exe to point to the newer version of the dll?
|
|
|
|
|
It is not possible, because may be the entry point of new dll file is not the same as older one!
Sojaner!
|
|
|
|
|
Hi everybody
I have a Word file with a picture inside which I saved as HTML filtered. I'm trying to send the Word file and have a little difficulty with it.
I know how to send a regular file but now I want to add to the email a picture which will be seen in the email and not as an attachment.
I know that I should use the "AlternateView" class and "LinkedResources" as the image but I don't know how to combine them together with the Word file itself.
Anybody did something like that or can direct me to a simple sample?
Another question: Is it possible to save a Word file that was opened for the first time and not saved as HTML filtered programmaticlly?
Thanks for any help
|
|
|
|
|
Hi,
I'm developing with Microsoft Visual Studio 2005 Version 8.
I want to create unit tests but can´t do so.
I don't have the new test option in the solution explorer.
Also, I can't add it as a project.
Don't know why, I have done it in other installations.
Do you know how can I add the possibility to create unit tests in C# in Visual Studio 2005?
Do I require the team edition?
Thanks
Martín
|
|
|
|
|
You need the Developer or Tester edition.
only two letters away from being an asset
|
|
|
|
|
|
kontrolakka wrote: Do I require the team edition?
You require Team Developer, Team Tester or Team Suite edition.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
kontrolakka wrote: Do I require the team edition?
For the integrated stuff from Microsoft, yep. Team Edition is the only one with Unittesting integrated.
You might want to look into NUnit[^] as a free alternative.
|
|
|
|
|
Absolutely, it works just fine.
And for simple cases, you can also implement a much simplified test harness yourself,
inside your app (so it searches for TestFixtures and executes them one by one).
|
|
|
|
|
I'm using csUnit, which features a nifty VS2005 plugin, but is otherwise the same as nUnit. You can find it here.
Standards are great! Everybody should have one!
|
|
|
|
|
Don't tell me, tell the OP. I'm on Team System myself, so...
|
|
|
|
|
The good news is that Visual Studio 2008 Pro will have unit tests. However, at the present time it seems that the open source unit test tools (possibly augmented by add-ins) are generally better than what is currently supplied with VS 2005.
Kevin
|
|
|
|
|
I want to get a (int) i=i+1 if I click a button every time ;
that is say , if I click onece i==1;
if I click twice ,i==2; and so on.
thank the one help me!
|
|
|
|
|
Hi Lockepeak,
What do you mean with ' click once ' and click ' twice.
Do you mean single click and double click, because in that case you can easily do :
this.button.Click += new System.EventHandler(this.method1);<br />
this.button.DoubleClick + new System.EventHandler(this.method2);
If you mean click once, and then add 1 to i , you could do :
private void method1(object sender, EventArgs e)<br />
{<br />
i=(i+1);<br />
}
assuming that you int i referenced in your application.
|
|
|
|
|
the answer:
If you mean click once, and then add 1 to i , you could do :
private void method1(object sender, EventArgs e)
{
i=(i+1);
}
assuming that you int i referenced in your application.
the method can't get the right anwser. whatever I click several times the value allways begin value
|
|
|
|
|
well, I'm not sure what you're doing wrong but I just made a test project and it works perfect. Every single time I click the button , 1 is added to int i . What I think the problem is , is that you don't have the integer referenced properly in your application. You have to reference it throughout the entire form so that it remembers the previous value:
namespace Blah<br />
{<br />
public partial class Form1 : Form<br />
{<br />
int i = 0;<br />
public Form1()<br />
{<br />
InitializeComponent();<br />
}<br />
<br />
private void button3_Click(object sender, EventArgs e)<br />
{<br />
i = (i + 1);<br />
MessageBox.Show(i.ToString());<br />
lbl.Text = i.ToString();
}<br />
<br />
}<br />
}<br />
}
if you reference int i anywhere else in the project, it will reset the value as soon as you dispose the messagebox. Intead of the messagebox, you could use a label to see the number increase everytime you click the button.
Hope this helped.
|
|
|
|
|
When the button onclick event fires have this in your code i++;
|
|
|
|
|
Why does the simple exercise below throw a StackOverflowException? I didn't think I was looping or doing anything recursive.
namespace ArrayTests
{
class HasArray
{
public int[] ExampleArray
{
set
{
ExampleArray = value;
}
}
public HasArray()
{
int [] ExampleArray = new int[2] { 1, 2 };
}
}
class Program
{
static void Main(string[] args)
{
HasArray concreteHasArray = new HasArray();
int[] otherArray = new int[2] { 3, 4 };
concreteHasArray.ExampleArray = otherArray;
}
}
}
|
|
|
|
|
But, you were doing something recursive. In ExampleArray property, through set method, you were setting value to the same property. To see this by yourself, set breakpoint on beginning of Main() method and press F11 key several times. You can correct your HasArray class by adding one attribute of integer array type to it which holds the value for ExampleArray property.
This is what I mean:
class HasArray
{
private int[] _exampleArray;
public int[] ExampleArray
{
get { return _exampleArray; }
set { _exampleArray = value; }
}
public HasArray()
{
_exampleArray = new int[2] { 1, 2 };
}
}
|
|
|
|
|
Hi Cristian,
The problem is here:
public int[] ExampleArray
{
set
{
ExampleArray = value;
}
}
In the Setter curly Brackets you reset the property (Same Name), so when you call concreteHasArray.ExampleArray = otherArray;
you conccurently setting the ExampleAray.
Solution:
<br />
namespace ArrayTests<br />
{<br />
class HasArray<br />
{<br />
private int[] _ExampleArray ;
public int[] ExampleArray<br />
{<br />
set<br />
{<br />
_ExampleArray = value;
}<br />
get{return _ExampleArray;}
}<br />
public HasArray()<br />
{<br />
ExampleArray = new int[2] { 1, 2 };<br />
}<br />
}<br />
<br />
class Program<br />
{<br />
static void Main(string[] args)<br />
{<br />
HasArray concreteHasArray = new HasArray();<br />
int[] otherArray = new int[2] { 3, 4 };<br />
concreteHasArray.ExampleArray = otherArray;<br />
}<br />
}<br />
}<br />
Hope this helps
Nassos
GanDad
|
|
|
|
|
public int[] ExampleArray
{
set
{
ExampleArray = value;
}
}
Basically, what you're saying here is:
"In order to assign a value to ExampleArray, you first assign the value to ExampleArray by assigning a value to ExampleArray by assigning a ......"
The "standard" property format is as follows:
private int _myVar;
public int MyProperty
{
get
{
return _myVar;
}
set
{
_myVar = value;
}
}
You see, the variable is what holds the actual data... The property is just a way to access it.
|
|
|
|
|
What method do you think is better when there are many threads?
Regards,
Analizzatore Cloro
|
|
|
|
|
Ooooooh....
I thought I was just saving myself the time to set up private and public parts. Now I see it is recursive, of course! Thanks!
|
|
|
|
|
I'd like to know if there is any mechanism to know where the threads that ThreadPool object manages, are finished.
The idea is having a loop that calls the ThreadPool to execute some method, and then block that main thread until all threads are finished.
Is that possible?
Regards,
Diego F.
|
|
|
|
|
Diego F. wrote: The idea is having a loop that calls the ThreadPool to execute some method, and then block that main thread until all threads are finished.
Then why would you even use threading at all??
The whole point behind threading is to move work to a seperate thread so your primary thread can continue to respond to requests.
The thread pool doesn't raise any events when a thread is complete. Your threaded code has to supply that, or some other method to signal completion.
|
|
|
|