|
Wjousts wrote:
You need to look at the value of i AFTER both commands have been executed, that is what you are still not seeing.
I'm looking at the value of i before the expression is evaluated, DURING THE EXPRESSION EVALUATION, AND after! And, I',m paying attention to the language specification that describes how each language evaluates and executes it's statements and expressions.
You're not. You just see the exact same syntax in two different languages and assume that they MUST work exactly the same and generate the exact same code and results. NOTHING could be further from the truth! Stop equating C# to C++! They are NOT the same!
Wjousts wrote:
In fact, have you even looked at the IL generated by the original code?
Yes, I have. And the code generated follow the C# language specification exactly. No surprise here. It does NOT, on the other hand, match the C++ language specification. No surprise here either...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote:
I'm looking at the value of i before the expression is evaluated, DURING THE EXPRESSION EVALUATION, AND after!
No your not. Look at the original question. The question asked what is the value of i AFTER the code (all of it) has been executed.
Dave Kreskowiak wrote:
I',m paying attention to the language specification
Where in the specification does it say that i++ does nothing?
|
|
|
|
|
Wjousts wrote:
No your not. Look at the original question. The question asked what is the value of i AFTER the code (all of it) has been executed.
In order to explain WHY the result of the expression is what it is, you have to look at how the expression is evaluated. This is covered in the language specs and by looking at the IL.
Wjousts wrote:
Where in the specification does it say that i++ does nothing?
I never said it "did nothing". Where on earth did you get this?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
So it does... It looks like your right. So what's the point of all this?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
how could i get machine names on network and show?
|
|
|
|
|
hi there,
take a look on this article:
http://www.codeproject.com/csharp/CompPickerLib.asp
this might give u an idea.
Hope this helps
<< >>
|
|
|
|
|
in a rich Textbox i wanna show some words as link (for example when u write www.codeproject.com , u see a web link ) but I wanna do the same for some words. After that I have to catch , this link whether is clicked or not.
How can I do ?
|
|
|
|
|
hi there,
this article might give u an idea on this
http://www.codeproject.com/cs/miscctrl/RichTextBoxLinks.asp
Hope this helps
<< >>
|
|
|
|
|
Hello Everybody,
Saving strings to files as i know it(from VB6) was similar to this:
struct string
{
int length;
chr str[length];
}
But in C# saving to files is through streaming(correct me if i am wrong) and they only accept arrays of bytes. Okay, I can convert a string to that, but it would be helpful if i didn't have to convert every single integer/long manually.
Anybody has an idea about doing this?
note: Serializing is not an option
|
|
|
|
|
(1) Can i move ONE (or two or three) instance(s) of a group of objects to a fixed or moving point? And how do you do that then?
(2)Can i redraw objects in the order of their Y value? And again how?
(3) I i have a large 'room' say, 500 by 500, can i make a view that shows 100 by 100 of the room that you can move around?
(4) Guess what im makin';P
|
|
|
|
|
2, get the Y value of the item, and then use refres();
3, use scrollbars...
Niklas Ulvinge aka IDK
|
|
|
|
|
i made the following stored procedure
CREATE procedure databasecreation (@a varchar(20))
AS
declare @strquery varchar(1000)
SET @strquery = 'create database '+@a+ ''
EXEC (@strquery)
ALTER procedure databasedeletion(@a varchar(20))
AS
declare @strquery varchar(1000)
SET @strquery = 'DROP database '+@a+ ''
EXEC (@strquery)
when executing it in front end C#
code;-
SqlConnection c = new SqlConnection("server=dbasvr03;uid=sa;pwd=sa;database=banking");
private void button1_Click(object sender, System.EventArgs e)
{
String databasename;
databasename =textBox1.Text;
c.Open();
SqlDataAdapter MyDataAdapter= new SqlDataAdapter("databasecreation ", c); MyDataAdapter.SelectCommand.CommandType = CommandType.StoredProcedure;
MyDataAdapter.SelectCommand.Parameters.Add(new SqlParameter("@a",
SqlDbType.VarChar,20));
MyDataAdapter.SelectCommand.Parameters["@a"].Value = databasename;
MyDataAdapter.SelectCommand.ExecuteNonQuery();
Console.WriteLine("DATABASE CREATED");
c.Close();
}
AT EXECUTION THE FOLLOWING ERROR COMES-
databasecreation error: identifier 'databasecreation' out of scope
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll
PLEASE GIVE A SOLUTION
|
|
|
|
|
Problem will be there in your stored procedure.
You are trying to alter the procedure on it's definision block itself.
Best way to do this, may split your procedure into two stored procedures.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
how do i bind tablestyle back to datatable after datagrid invoke.
when im updating datagrid with invoke ..
private void UpdateGrid(DataSet table)
{
dataGrid1.DataSource=table.Tables["data"];
}
dataGrid1.Invoke(new UpdateGridCallback(this.UpdateGrid),
new object[]{some_data_set});
..i lose datagrid style which is already defined.
bye
-- modified at 3:56 Friday 23rd September, 2005
|
|
|
|
|
Through DataGrid.TableStyles proerty you will get the table style which you assigned to the Datagrid.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
ok i solved that, but what if i invoke more times. First time its working ok, when i do it second time, datagrid get screwed and starts to blink.
im trying to use threads to update datagrid form dataset.
and suggestions
|
|
|
|
|
You try to assign the Table style property to null , then try to assign the second required table stayle property.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
hi,
i dont know if this is still a question of table styles, look what i get
first invoke ..ok
invoke again ???
hope to hear from you again
bye
rado.
|
|
|
|
|
write a C function that produces a histogram of the number of occurrence of each letter in a character string. your function should be case independent. your function should have two parameters : the first is a pointer to an array of 26 int that holds the histogram; the second is a pointer to a character string. function return the number of letters found in the character string as an integer
|
|
|
|
|
davidcooler wrote:
write a C function
Hope you are aware that this is the C# forum.
Anyway, it's a nice programming task you described, but where is the problem or do you expect us to write the whole thing for you?
www.troschuetz.de
|
|
|
|
|
please send me the code for editing and updating data in a data grid.in C# ASP.net.
I have used the grid properties given in .net
|
|
|
|
|
hi there,
I'm pretty sure that there are a ton of articles about this on CP
btw, take a look on this
http://www.codeproject.com/aspnet/EditGrid.asp
<< >>
|
|
|
|
|
i made the following stored procedure
CREATE procedure databasecreation (@a varchar(20))
AS
declare @strquery varchar(1000)
SET @strquery = 'create database '+@a+ ''
EXEC (@strquery)
ALTER procedure databasedeletion(@a varchar(20))
AS
declare @strquery varchar(1000)
SET @strquery = 'DROP database '+@a+ ''
EXEC (@strquery)
when executing it in front end C#
code;-
SqlConnection c = new SqlConnection("server=dbasvr03;uid=sa;pwd=sa;database=banking");
private void button1_Click(object sender, System.EventArgs e)
{
String databasename;
databasename =textBox1.Text;
c.Open();
SqlDataAdapter MyDataAdapter= new SqlDataAdapter("databasecreation ", c); MyDataAdapter.SelectCommand.CommandType = CommandType.StoredProcedure;
MyDataAdapter.SelectCommand.Parameters.Add(new SqlParameter("@a",
SqlDbType.VarChar,20));
MyDataAdapter.SelectCommand.Parameters["@a"].Value = databasename;
MyDataAdapter.SelectCommand.ExecuteNonQuery();
Console.WriteLine("DATABASE CREATED");
c.Close();
}
AT EXECUTION THE FOLLOWING ERROR COMES-
databasecreation error: identifier 'databasecreation' out of scope
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll
PLEASE GIVE A SOLUTION
-- modified at 2:57 Friday 23rd September, 2005
|
|
|
|
|
hi there,
firstly, I saw the parameter name in C# code is not the same as the parameter is declared in the store proc
check it again
<< >>
|
|
|
|
|
Hi,
I need to trap a desktop locker activating along with the screen saver which is activating after 3mins machine idle. I need to by-pass/ Detect this occurance. This can be occured from Keyboard where user types this key combination OR Software generated Even...
I tried with forcefully calling MouseMove after an interval, to deactivate the screensaver... but not succeed..
Please give some ideas....
Thanks in advance....
Krishna kumar.R
krishnakumar75@rediffmail.com
Krishnakumar
krishnakumar75@rediffmail.com
|
|
|
|