|
kontax wrote: 1)Have you ever used it? A little little explanation of how it works is possible?
Yes. Just type in 'msbuild /?' to get all the options. There are MSDN docs too, Google for a few tutorials to get the hang of it. VS uses it internally.
kontax wrote: 2)What do you mean with "via code (hard) or just as a process (easy)."
via code: Reference the MSBuild assembly (not sure about the name now), and call the method via code.
via process: Process.Create("msbuild ...")
|
|
|
|
|
|
|
Yes,i tried that way. But I understood only how to compile a source files. I could just compile from a .cs file to a .exe file. I need to compile a project made from a form and its .cs file together in an executable file.
Is there a workaround to do this with CodeDom or CSharpProvider?
|
|
|
|
|
If you put your form's designer generated code and the cs file into one file then you can compile it using CSharpProvider, but you can't compile a project.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
|
With CSharpProvider you have to programmatically add referenced assemblies. Did you have a look at the link I provided?
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Yes I did.. and it's a really good article!(I also didn't know how to drag files..)
I'd seen you used the CSharpProvider, i just thought it could be possible also with CodeDom like i did, cause I used it to compile other kind of .cs files.
Ok, I'll switch to the CSharpProvider..
THANKS for everything!
bye
|
|
|
|
|
You are welcome
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Hey
I have a textbox with values = 1 + 1,3 + 1 + 7
How can i calculate that so when i push the button calculate will give the result = 10,3
Thanks very very mutch
its really importing
|
|
|
|
|
|
AFAIK, this things are done by converting the arithmetic expression to it's postfix form. Do some reading on that.
|
|
|
|
|
thaks very mutch but you do not have som method like double.parse(textbox.text) or somthing like that som can help me out of here.
I used Inof.Lundin.Math but this cannon add decimal this can just add 1+1 = 2 but not 1+1,4 = 2,4
|
|
|
|
|
Just out of curiosity I downloaded the library you mentioned and it works for me. This is my small test:
info.lundin.Math.ExpressionParser exp = new info.lundin.Math.ExpressionParser();
Hashtable h = new Hashtable();
h.Add("x", "1");
h.Add("y", "1,5");
h.Add("z", "0,23");
double result = exp.Parse("x + y + z", h);
MessageBox.Show(result.ToString());
The result is 2,73 -just as expected.
EDIT:
If you want to take the expression directly from a textbox, use this code:
info.lundin.Math.ExpressionParser exp = new info.lundin.Math.ExpressionParser();
Hashtable h = new Hashtable();
double result = exp.Parse(myTextBox.Text, h);
MessageBox.Show(result.ToString());
This also works for me. However (just a guess), you might get that error because you are using incorrect decimal separator for your culture. On my machine the comma is the separator, but for you it might be the dot. Check it.
|
|
|
|
|
Thanks very mutch blackjac
But it still not work if i use dot ex. 1.4 then it takes it like 14 and if i use 1,4 coms with error
"No value associated with 1,4"
|
|
|
|
|
2,4 is not a valid decimal/floating-point-number in most cultures.
|
|
|
|
|
i use a culture en US ? in my web.aspx project.
|
|
|
|
|
Then you need a dot '.' not a comma ',' eg 2.453
|
|
|
|
|
Now it works.. thank thanks very much..
|
|
|
|
|
Burim Rama wrote: thank thanks very much..
No problem, was easy once I had all the info
|
|
|
|
|
somtimes you can use lot of time with som easy code
|
|
|
|
|
Burim Rama wrote: i use a culture en US ?
Decimals are not done with commas in the US
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
|
do you want to put all together on the screen? 1 + 1,3 + 1 + 7 if not
add a button "="
use:
int total;
click button "=" event (or other) inside put:
total = total + convert.toint32(textbox_x)
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
Hi,
I am using the MSCOMM for sending and getting the response from hardware in Desktop Embedded Application I am getting the following values in response of MSCOMM port:
Wrong Values :- 0x192,0x20ac,0x201a,0x201e,0x2026,0x2020,0x2021,0x2c6,0x2030,0x160,0x2039,0x152
0x17d,0x2018,0x2019,0x201c,0x201d,0x2022,0x2013,0x2014,0x2dc,0x2122,0x161,0x2039
0x153,0x17e,0x178
Instead the values should the values coming from the hardware are
Correct Values :-
0x80,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8e,0x91,0x92
0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0x9b,0x9c,0x9e,0x9f
But in Dot Net the Values given above are coming in the Input of MSCOMM.When I use the above values in my code as :-
char chars = Convert.ToChar(response)
MyByte = Convert.ToByte(chars)
where response = 0x192
The 2nd line of getting MyByte is skipped by Dot Net for above values
Can anybody tell why is this happening
|
|
|
|