|
You have to install the Correct Framework. Meaning the target framework you used to compile your application. Now if you are creating a setup project there is an option that says "AllowLaterVersion" if you set it to true, this will allow you to run your 2.0 project in a 3.5 environment
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
|
|
couldn't have put it any better
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hello forum,
I need help. In my program I use a rich text box to display a text file. This text file contains some normal text and a special character "ë". User can modify this text file. To save the updated file I used below code :
TextWriter tw = new StreamWriter(@label3.Text);
tw.WriteLine(rtEngData.Text);
tw.Close();
Note :Here label3 contains the file name.
while saving the file I found one problem. The character "ë" is changed with "ë". I don't know why but it happens.
Can any one suggest me what to do to solve this problem.
I want to save the file as it is in the richtextedit.
waiting for any kind reply.......
Thanks
Vishal Moharikar.
|
|
|
|
|
vishal moharikar wrote: The character "ë" is changed with "ë".
You need to specify the correct encoding. System.Text.Encoding[^] class can be used for various supported encoding. I believe you need to use Encoding.UTF8[^]. StreamWriter 's constructor has an overload which takes Encoding . You can use that.
|
|
|
|
|
Unrelated: What's with the @ in @label3? It seems unnecessary.
|
|
|
|
|
|
I presume you mean in Winforms.
DOCK is the property you are looking for. Your user control will have a dock property.
User the Z order (bring to front/ send to back) of the control to manage the positioning in the control hierarchy.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
No i am talking abt Window, Like if u open a Drive it should have Left pane Just has same in M-Files.
|
|
|
|
|
Which is what Mycroft was also talking about. You need to write the code to do what you need, it isn't magic.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
I think you mean that you want the form divided into two panels, a left pane and a right pane? If so, then look at SplitContainer control, which does exactly that.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Hi All,
I am new to c#, I have a requirement to design a wizard in c# So please guide to do this.
|
|
|
|
|
|
Thank you but I want to create my own, don
t want to use of others control.
Please let me know how to do that?
|
|
|
|
|
Hello everyone,
I ran into a bit of an issue with Math.Pow() today while doing some work with cubic equations. The cubic root of a real negative number, is a real negative number, correct? For some reason, when X is a negative value, Math.Pow(X, (double)1/3) returns NaN instead of a negative real number.
Hopefully I'm not forgetting something...
Any help would be appreciated, thanks.
|
|
|
|
|
Huh, must not realize what you're trying to do. Maybe write your own?
The Algorithm (and Mathematics) forum may be a better place to post this.
|
|
|
|
|
Opps, sorry if I posted in the wrong forum, it just seemed like a C# thing.
In case you didn't know, a cubic root is just like a square root (x^(1/2)). As in 2^3 = 8, 8^(1/3) = 2.
|
|
|
|
|
Not the worst choice of forum.
I realize that about power and root, on the other hand, a double can't represent 1/3 precisely.
|
|
|
|
|
It gives the correct answer if X is positive in Math.Pow(X, (double)1/3), so something weird is going on...
|
|
|
|
|
Interesting problem here. Math.Pow probably (I'm not sure, but it's what I would do) uses Taylor series to calculate e^(x * ln(y)) (where ^ denotes exponentiation, and the goal is pow(x,y))
And the natural logarithm of a negative real is of course a complex, which it might not be able to handle, causing a NaN somewhere which then propagates through all further calculations to end up in the result.
This is just a theory, and I wouldn't bet anything on it, but I think it's plausible.
|
|
|
|
|
Yeah, that sounds right. NaN seems to be the C# default for anything that would be complex.
I made a little work around which seems to work.
static public double Pow(double x, double y)
{
return y < 1 && (1 / y) % 2 == 1 && x < 0 ? -Math.Pow(Math.Abs(x), y) : Math.Pow(x, y);
}
Though this seems really improper...
|
|
|
|
|
Brandon Walton wrote: (1 / y) % 2 == 1
This looks dangerous, equality of doubles.. well.. you've heard that before. Are you sure it's not "!= 0"?
But anyway, the default math library that comes with .NET doesn't do complex math. It's a shame, but that's how it is.. Now, I know you probably meant it the right way, so no offense, but just in case (and for completeness) : normal CPU's implement the IEEE 754 kind of math so NaNs just happen, C# can't help it (ok it could, but that would just make it terribly slow at floating point math)
|
|
|
|
|
Ohh, I always assumed NaN were native to C#. I need to get out more...
harold aptroot wrote: This looks dangerous, equality of doubles
Just the way I like it . But yeah, just pretend you didn't see that.
harold aptroot wrote: Are you sure it's not "!= 0"?
And yeah, should be != 0 .
|
|
|
|
|
I would try it normally first, then only do weird stuff if the result is NaN (or on Exception).
|
|
|
|