|
thanks for your reply Divyang Mithaiwala ,
i know nothing about socket programming so i am confused but i am searching i will try your said is there any article about socket programming you advise me? i hope i can manage
have a nice day
|
|
|
|
|
|
hi again ,
i am trying to use struct but getting error could you write me an example please , i have never used struct before
openup your heart and let the sun shine in
|
|
|
|
|
i have resolved the problem
openup your heart and let the sun shine in
|
|
|
|
|
i need print only numbers after comma
example
double x=33.452
Console.WriteLine(x);
output
452
how I do this ?
|
|
|
|
|
Heres a simple way:
static void Main(string[] args)
{
double x = 33.452;
string number = x.ToString();
char[] sperator = { '.' };
string[] seperate = number.Split(sperator);
double xSplit = Convert.ToDouble(seperate[1]);
Console.WriteLine(xSplit);
}
That will output 452 to the console. There might be an easier way though I'm not sure.
Hope that helps
|
|
|
|
|
I like your's with the colored
background better...
|
|
|
|
|
Probably and eaiser way...But
this works.
double d = 3.14;
string s = d.ToString();
char[] delimiter = { '.' };
string[] a = s.Split(delimiter);
Console.WriteLine(a[1]);
gl-Paul
|
|
|
|
|
I put the exact same thing 8 min eariler
|
|
|
|
|
didn't see your post...From
your '???' do you not realize
how two people can post within
an 8 minute perion?
|
|
|
|
|
I'm not insulting you I just thought it was kind of funny that we said the exact same thing.
|
|
|
|
|
Hopefully its' a good thing....
|
|
|
|
|
These message boards are practically like instant messaging lol.
|
|
|
|
|
yes...Coding today is almost too
easy with all the help availible
in realtime...;)
|
|
|
|
|
Unfortunately the other solutions will fail under other cultures. Do the following instead:
double x = 33.452;
Console.WriteLine(x % Math.Floor(x));
|
|
|
|
|
This works for any culture. It also handles the case where there is no fractional digits, instead of causing an exception.
double x = 33.452;
string number = x.ToString(CultureInfo.InvariantCulture);
int pos = number.IndexOf('.');
if (pos == -1) {
Controle.WriteLine();
} else {
Console.WriteLine(number.Substring(pos + 1));
}
---
b { font-weight: normal; }
|
|
|
|
|
I've got an app as described in the subject. I am trying to write an update class that will handle changes to the database structure. I can figure out how to create a new tables using "CREATE TABLE" statements with the ODBCCommand object. What I cannot figure out is how to set field properties. Anything other than the basic (fld_name fld_type,...) statements result in an "[Error 42000] Syntax error in CREATE TABLE statement".
Mostly what I'd like to be able to do is set default values and create auto-number fields. If anyone can give me a bit of guidance on this or direct me to a useful link, I'd greatly appreciate it.
TIA,
Eric
|
|
|
|
|
How would I go about finding the free space on a given disk?
Thanks for any help.
|
|
|
|
|
check out 'DriveInfo class' in
the help menu. The sample seems
to be what you need.
gl-Paul
|
|
|
|
|
Yup, exactly what I need.
Thanks
|
|
|
|
|
Hi,
I'd like to make a listbox display multilines to user without using scrolldown when another event is clicked. And the same listbox shows only one item when another event is clicked.
Ex: when you click a button A, then a listbox B shows multilines of items.
And when you click the button A again, the listbox B shows only one line.
Thanks.
Kyah
|
|
|
|
|
Do you prefer any address about this algorithm or do you have any source code about them.
Thank you.
|
|
|
|
|
Are you trying to simulate multitask scheduling, or are you trying to apply these concepts to real task queue processing?
--
I've killed again, haven't I?
|
|
|
|
|
real task queue processing
|
|
|
|
|
I am using some functions available in wininet.dll to monitor, dial and hangup internet connections from my C# application.
here I have some questions:
1)Is it true that .Net Framework 2 hasn't some functionality for the same?
2)I'm using the InternetDial function of this API to connect to Internet. This function has a pointer to a connection number, so when I have to HangUp the connection I use InternetHangUp which also uses the above connection number to shut this connection down.
however I couldn't find a way to get the connection number of an already active connection, when my aplication goes on-line and have the possibility to hang-up this active connection.
So, the question is of course:
does anybody knows how to check or get this connection number?.
So far for me,the only two functions make use of this connection number are InternetDial and InternetHangUp, not so the also useful function InternetGetConnectedState which is capable to say that there is an active connection but not which connection number this connection has.
Thanks in advance
-- modified at 14:57 Friday 10th March, 2006
|
|
|
|