4,439 Posted Topics
Re: Perhaps use ToString([aformat](http://www.csharp-examples.net/string-format-datetime/)) ? | |
Re: I don't know an exact answer, but [this](http://msdn.microsoft.com/en-us/library/zf3hakf7(v=vs.110).aspx) may perhaps help. | |
Re: In your function example, returning the integer 0 is a bit meaningless. You function can as well returning nothing(void) like: void x() { cout<<"Hello World"; } | |
Re: What seems weird to me is that you understand how to concatenate two string and append them to a richTextBox and that you have trouble with appending a space. My two esteemed colleages above have already explained this well. I will add to this: const string aSpace = " "; … | |
Re: Do you want a solution for that on the C# forum? | |
Re: Also note that a RichTextBox has an [AppendText method](http://msdn.microsoft.com/en-us/library/system.windows.controls.primitives.textboxbase.appendtext.aspx) So you could build up your text, for example with StringBuilder, and append it to the RichTextBox. | |
Re: Check the nose of your dog. If it feels wet and cold, if dry and warm ==> vet @RJ Some dogs have their ears cut, so they don't hang. [link](http://en.wikipedia.org/wiki/Doberman_Pinscher) | |
Re: What would be wrong, to first copy Listbox2 to Listbox1 and then fetch data from DB to Listbox2? | |
Thought it would be very complicated to include speech in your programs. As it seems, in it most simplest form it can be done in two lines. Don't forget to include the System.Speech reference in your References. Enjoy! | |
Re: To me "UNAME" converts to hex as "55 4E 41 4D 45". How you do arrive at "55 4E 41 4D 45 28 31 29", probably remains a mystery to all of us. | |
Re: Google! [Example](http://www.codeproject.com/Articles/23387/Introduction-to-C-and-Fuzzy-Logic). | |
Hi, in my polynomial class all the terms consist of a List of tuples (double, uint), representing the coefficient and the exponent; a real and a natural number. The +operator implementation works great, but I was wondering if I could avoid to write two times `grouping.Sum(s => s.Item1)` It somehow … | |
Re: Google! [Example](http://stackoverflow.com/questions/854953/datagridview-bound-to-a-dictionary). | |
Re: F would certainly be a wrong answer.It is either A,B,C,D or E; or a combination of these. | |
Re: You could implement a complex number using a struct with real and imaginary parts some properties like modulus and conjugate etc. And don't forget to include a bunch of operator overloading code too. Just for starters. Succes! | |
Re: [Write to a text file](http://msdn.microsoft.com/en-us/library/8bh11f1k.aspx) | |
Re: You could also have a look at this snippet [url]http://www.daniweb.com/code/snippet217265.html[/url] It also allows for a backspace and a decimal point. | |
Re: Put the for loop on line 21 outside the two other for loops. | |
Re: Why not use one Timer and let it count in seconds. Every time you want to display minutes and seconds, you divide the number of seconds by 60. This will give you the minutes. The remainder are seconds. Use the modulo operator. Example: say your timer counts 4567 = N. … | |
Re: Hi claretakum, welcome at DaniWeb. Your question is not simple to explain here in a few lines. Google for tutorials. [Example](http://www.homeandlearn.co.uk/NET/nets12p2ed.html). | |
Re: As of 2013 there is also a new formula around: BMI = 1.3 x weight(kg)/height(m)^2.5 = 5734 x weight(lb)/height(in)^2.5 | |
Re: I would use 3 "bin" variables. If the value of a char(int) > 46 and < 58 it would be a digit and I would increment a **digitbin** variable. Same test for upper and lower case letters. Wonder what would be faster, this strategy or AD's? | |
Re: Use the [TimeSpan structure](http://msdn.microsoft.com/en-us/library/system.timespan.aspx) | |
Re: @oussama 1: your code is a bit incorrect. I would have corrected it, but found a [good post](http://www.daniweb.com/software-development/vbnet/threads/423618/adding-multiple-textboxes-to-a-form-control-array) here on this site, with an answer of the Reverend himself! | |
Re: You can give the ToString method of the Decimal type a format-string. Read [this article](http://msdn.microsoft.com/en-us/library/fzeeb5cd(v=vs.110).aspx). | |
Re: Reworked your program a bit. If you have trouble with understanding what I did, please ask. static void Main(string[] args) { Person[] Parray = new Person[3]; Person p1 = new Person(); for (int i = 0; i < Parray.Length; i++) { Parray[i] = new Person(); Console.WriteLine("Enter your first name "); … | |
Re: There is the **Name** property of a textbox. But it seems you need an array or list of textboxes. Is this correct? | |
Re: In your loop you are doing `counter++;` three times. Once is sufficient; Also I would do the square root, after the loop. | |
Re: You normally should at least get a warning if some code from obsolete code is used. Is the main partial form part missing? | |
Re: Hi, tran.duy.77, welcome at DaniWeb! Yes, you can help us. Could you elaborate on your question? | |
Re: It is just shortcut syntax for: private string XRandom; public string random { get { return random; } set { random = value; } } The compiler comes up with his own private field, so you don't have to bother. It is just a 'lazy programmers' thing. Think of it … | |
Re: You could call the number after the comma a fieldlength specifier. So {0,2} means: write the first argument `0` and use `2` console positions for it. More explanation can be found [here](http://msdn.microsoft.com/en-us/library/txafckwd(v=vs.110).aspx). Experiment! | |
Re: Did you notice that 1 = 1x1 4 = 1x1 + 1x3 13 = 1x1 + 1x3 + 1x9 40 = 1x1 + 1x3 + 1x9 + 1x27 121 = 1x1 + 1x3 + 1x9 + 1x27 + 1x81 | |
Re: Try this: [CODE]public static int gcd(int x, int y) { //First quote from the question: //"If y is equal to 0, then Gcd( x, y ) is x; " if (y == 0) return x; //Second quote: //"otherwise, Gcd( x, y ) is Gcd( y, x % y ), where … | |
Re: Hi, welcome at DaniWeb! > I like science fiction, progressive rock, classical music, jazz, and blues. Seems we have some interests in common. | |
![]() | Re: Nobody can deny that male and female are different, so a gender equality will never exist. When I was 4-5 years old I played with dolls but also with little plastic soldiers(GI Joe had to be invented) among other things. My parents never said: "Here are dolls, PLAY! GENDER EQUALITY … ![]() |
Re: Perhaps [this](http://www.daniweb.com/software-development/csharp/code/470084/splitting-a-string-delimiters-included#post2049667) can help you out or get you started. | |
Re: Hi gwboolean, welcome at DaniWeb! Did you know, that after a long debug session of a computer program and you finally watch it working before your eyes, you can have the experience of being in nirvana? Success with all you are doing! | |
| |
Re: This is a [way to make a MessageBox](http://www.daniweb.com/software-development/csharp/code/364073/how-to-set-up-a-modal-dialog-form) And [this](http://www.daniweb.com/software-development/csharp/code/238279/bouncing-ball) is another old "snippet" of mine where a dialogbox and a form communicate with each other. | |
Re: Beware that C# is case sensitive, VB is not. | |
Re: You could turn it into a method, something like this: static void Print(string title, string name) { Console.ForegroundColor = ConsoleColor.Yellow; Console.Write(title); Console.ForegroundColor = ConsoleColor.White; Console.WriteLine(name); } | |
Re: Something like this? timePicker.Format = DateTimePickerFormat.Time; timePicker.ShowUpDown = true; | |
Re: I don't know how to rotate either, but I know how to google; examples: [rotate in winforms](http://stackoverflow.com/questions/416897/how-do-i-rotate-a-label-in-c) [in WPF](http://msdn.microsoft.com/en-us/library/system.windows.media.rotatetransform.angle(v=vs.110).aspx) | |
Re: Bonjour monsieur "lundi", bienvenu à DaniWeb! Just to let you know that me and many others here can understand French. But it is in fact against [the rules](http://www.daniweb.com/community/rules) to communicate here in other languages than English. It is a good rule. Consider the mess that would happen if this great … | |
![]() | Re: I'm just a Python learner myself and I also struggled wit thisone. In newer versions of Python (Python 3) print has become a function, so `print("hello")` should work. |
Re: yes, AND YOU DON'T HAVE TO SHOUT SO LOUD! | |
Re: LINQ stands for Language INtegrated Query; It is a sort of query tool inside C# to query a database, a List of objects or an XML file. In a way, the query becomes independent of the source. | |
Re: Both languages have their merits. It's my impression that you can develop faster in C# than in C++. C++ programs run faster, because native code is generated by a C++ compiler. C# programs are a bit slower, because a C# compiler produces intermediate code, to be compiled into native code … | |
Re: Hello trannd 55, welcome at DaniWeb. This is an [example](http://msdn.microsoft.com/en-us/library/system.io.ports.serialport(v=vs.110).aspx) of how to use a serial port. Once you can read data from it, you could write any kind of filter method you like, I guess. |
The End.