|
pbraun wrote: believe int in a 32-bit system is 32 bits as suggested, but in a 64 bit system, int becomes 64 bits.
As a result of that information, when it is known that 32 bits will suffice, please be sure to use Int32. Otherwise, when your program is run on a 64 bit system you could have unexpected results.
Yeah. nice.. Thanks...
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
That is completely false, don't listen to him. Jeez, the misinformation is astounding.
In .NET, a C# int just aliases System.Int32, which is 32 bits no matter what operating system you're on, including 64-bit OSes.
|
|
|
|
|
oh.. Thanks... Judah. it's the best if it's like that.. We, .NET dev, won't need to care about what OS the users are running.. good.
|
|
|
|
|
That's completely false. In .NET a C# int simply aliases System.Int32, which is *always* 32 bits, regardless of whether you're running on a 64-bit OS.
Now, in native C++, int may be different widths on different operating systems. But if you're coding in .NET, an Int32 is always 32 bits.
|
|
|
|
|
I need proof (besides the MSDN documentation) that int is always 32 bits. Will MS change their minds about the size of int in the future? Who can tell. For those reasons it is always best to ensure that you know the size of the variables that are in use.
Phil
|
|
|
|
|
|
i want to create accont book using c#
|
|
|
|
|
Well, I guess you should give it a go and let us know how it goes. No one here is going to write it for you. Once you start writing the code, if you run into specific problems you would like some help with, let us know and we will try to help you with your specific problem. If you are looking for something that is already written then seach the codeproject site or google.
Ben
|
|
|
|
|
start from looking at some sample account books....
and make a work breakdown structure of your activities
and then start writing code for your each activity
and if u face any problem then write about it
|
|
|
|
|
Hi, I'm writing a Media Player App in C# and would like to know how can I implement an equaliser (bass, treble, etc) in it. Can it be done using DirectShow.NET. I've read that DirectSound provides me with an option. But I'm not too sure. I would prefer a C# soultion.
Thanks...
|
|
|
|
|
I' going to update database by using datagrid which is connected to data base by it's datasource.
I want to change data in datagrid and then save it in my data source(e.g. dataset) then update my database with this changed data (e.g. using update command of my adapter).
I want to do these things in my winApplication!
I don't know if datagrid has any event to do these things or not?
If not what should I do?
Thanks.
|
|
|
|
|
Hello...
I'm new to C# and i want to train my skills with programming an Application
that looks at 3 progressbars and make the values of them "even", like
if pbar1's value is 34, it becomes 30, but if it is 36, it becomes 40.
I use it to test the Fuzzy logic dot net =x
Now this is the code i need help with:
<br />
<br />
<br />
private void button2_Click(object sender, EventArgs e)<br />
{<br />
if (chkbx1.Checked)<br />
{<br />
vbar1.Value = Random;<br />
}<br />
}<br />
<br />
<br />
"button2" is my Object for generating random Numbers for those pbars with checked checkboxes...
Now how to get that random Value from 6 to 86? please help =(
|
|
|
|
|
Use the System.Random class...
Paul
|
|
|
|
|
System.Random is the same as Random D:
someone please explain me =(
|
|
|
|
|
Call the overload of System.Random.Next that accepts 2 arguments. The first is your min value, the second is your max value.
This is all explained in the documentation...
Paul
|
|
|
|
|
just create a new instance of Random class like
Random rnd=new Random();
use the next method for generating random number
int randomNumber=rnd.Next(6,86);
good luck
|
|
|
|
|
omg there is no next method...
Maybe i forgot a using directive?
there are only 2 methods on Random... it's
Equals
and
ReferenceEquals
|
|
|
|
|
ok nevermind i got it thanks!
|
|
|
|
|
Please consider that the second parameter is the exclusive upper bound of the random variate i.e. rnd.Next(6,86); will generate random numbers between 6 and 85. If you want the 86 to be generated too, the second parameter must be 87.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Ok i've got another problem...
Now if you click on the "Make even!" button (for rounding up and off to 10~values, like 10 20 30 40)
i don't know what to put it...
I mean it should also be usable in other things like unknown values from 1~25233636 for example.
it's currently this:
<br />
#region Vbar1<br />
<br />
if (vbar1.Value = 6-10)<br />
{<br />
vbar1.Value = 10;<br />
}<br />
<br />
#endregion<br />
1. i don't know how to make it like "from 6 to 10", the - isn't working O__O
2. it's not really flexible and i have to make like 9 if handlers for every pbar...
<br />
if (vbar1.Value > 6 & < 10 )<br />
isn't working too...
|
|
|
|
|
Divide the number by ten, round it and finally multiply with ten:
int x = 15;
x = (int)(Math.Round(x / 10.0) * 10.0);
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
wow you'r really good in c# =O
Sorry i'm new to all this and i don't have much time for learning it...
hmm
<br />
#region Vbar1<br />
<br />
vbar1.Value x = 15;<br />
x = (vbar1.Value)(Math.Round(x / 10.0) * 10.0);<br />
<br />
#endregion<br />
the debugger says vbar1 is a field but it's used like a type @_@
and what's the 15 for?
-- modified at 14:15 Tuesday 14th August, 2007
|
|
|
|
|
okay thanks all for helping me =]
here's the source and exe:
hosted.filefront.com/sylenze
|
|
|
|
|
hi there,
i m doing comparision like this:
if (xmlnode[i].NextSibling.HasChildNodes == true)
to know that is there any further node?
but when this codes is giving error after last node
the error is
Object reference not set to an instance of an object.
anybody knows the solution..?
Becoming Programmer...
|
|
|
|
|
xmen_xwk wrote: xmlnode[i].
Either this is NULL
or
xmen_xwk wrote: xmlnode[i].NextSibling
this is NULL
|
|
|
|