4,439 Posted Topics

Member Avatar for Cameronsmith63

Perhaps use ToString([aformat](http://www.csharp-examples.net/string-format-datetime/)) ?

Member Avatar for Cameronsmith63
0
2K
Member Avatar for Anto_1

I don't know an exact answer, but [this](http://msdn.microsoft.com/en-us/library/zf3hakf7(v=vs.110).aspx) may perhaps help.

Member Avatar for ddanbe
0
1K
Member Avatar for vishalonne
Re: c++

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"; }

Member Avatar for Learner010
0
231
Member Avatar for Pilot122x

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 = " "; …

Member Avatar for Pilot122x
0
152
Member Avatar for Anto_1
Member Avatar for Pilot122x

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.

Member Avatar for Pilot122x
0
154
Member Avatar for <M/>

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)

Member Avatar for Agilemind
1
420
Member Avatar for samkri

What would be wrong, to first copy Listbox2 to Listbox1 and then fetch data from DB to Listbox2?

Member Avatar for Sulaiman_1
0
189
Member Avatar for ddanbe

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!

Member Avatar for kplcjl
5
563
Member Avatar for infatuate

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.

Member Avatar for naveen1993
0
160
Member Avatar for kalidas.rajendran.1

Google! [Example](http://www.codeproject.com/Articles/23387/Introduction-to-C-and-Fuzzy-Logic).

Member Avatar for ddanbe
0
138
Member Avatar for ddanbe

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 …

Member Avatar for ddanbe
0
241
Member Avatar for omojolinho
Member Avatar for ddanbe
0
99
Member Avatar for damte38

F would certainly be a wrong answer.It is either A,B,C,D or E; or a combination of these.

Member Avatar for ddanbe
0
2K
Member Avatar for razylovesyou

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!

Member Avatar for ddanbe
0
262
Member Avatar for Ajay_9

[Write to a text file](http://msdn.microsoft.com/en-us/library/8bh11f1k.aspx)

Member Avatar for Sulaiman_1
0
245
Member Avatar for kimbula...

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.

Member Avatar for kplcjl
0
5K
Member Avatar for theashman88
Member Avatar for pbarks1

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. …

Member Avatar for pbarks1
0
189
Member Avatar for claretakum

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).

Member Avatar for ddanbe
0
49
Member Avatar for agrbinoo.albaker

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

Member Avatar for jwenting
0
181
Member Avatar for JOHN-shirley

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?

Member Avatar for David W
0
232
Member Avatar for Satyam_1

Use the [TimeSpan structure](http://msdn.microsoft.com/en-us/library/system.timespan.aspx)

Member Avatar for ddanbe
0
98
Member Avatar for t3cho

@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!

Member Avatar for oussama_1
0
249
Member Avatar for sundog1

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).

Member Avatar for ddanbe
0
429
Member Avatar for <HHH>

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 "); …

Member Avatar for <HHH>
0
393
Member Avatar for waseem1345

There is the **Name** property of a textbox. But it seems you need an array or list of textboxes. Is this correct?

Member Avatar for waseem1345
0
160
Member Avatar for Elharts

In your loop you are doing `counter++;` three times. Once is sufficient; Also I would do the square root, after the loop.

Member Avatar for Kristian_2
0
246
Member Avatar for pritaeas

You normally should at least get a warning if some code from obsolete code is used. Is the main partial form part missing?

Member Avatar for pritaeas
0
264
Member Avatar for tran.duy.77

Hi, tran.duy.77, welcome at DaniWeb! Yes, you can help us. Could you elaborate on your question?

Member Avatar for ddanbe
0
83
Member Avatar for theashman88

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 …

Member Avatar for tinstaafl
0
228
Member Avatar for theashman88

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!

Member Avatar for ddanbe
0
195
Member Avatar for catastrophe2

Did you notice that 1 = 1x1 4 = 1x1 + 1x3 13 = 1x1 + 1x3 + 1x9 40 = 1x1 + 1x3 + 1x9 + 1x27 121 = 1x1 + 1x3 + 1x9 + 1x27 + 1x81

Member Avatar for catastrophe2
0
235
Member Avatar for NEMO_1990_2007

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 …

Member Avatar for David W
0
557
Member Avatar for ChuckBaggett

Hi, welcome at DaniWeb! > I like science fiction, progressive rock, classical music, jazz, and blues. Seems we have some interests in common.

Member Avatar for ddanbe
0
292
Member Avatar for diafol

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 …

Member Avatar for iamthwee
0
467
Member Avatar for mohanhas

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.

Member Avatar for ddanbe
0
167
Member Avatar for gwboolean

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!

Member Avatar for JorgeM
0
205
Member Avatar for dennis254
Member Avatar for ddanbe
0
183
Member Avatar for BogdanCov

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.

Member Avatar for ddanbe
0
174
Member Avatar for khair.ullah
Member Avatar for pb404

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); }

Member Avatar for Alberto Bucur
0
10K
Member Avatar for thirteen_xx

Something like this? timePicker.Format = DateTimePickerFormat.Time; timePicker.ShowUpDown = true;

Member Avatar for thirteen_xx
0
816
Member Avatar for Ajay_9

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)

Member Avatar for ddanbe
0
158
Member Avatar for ponedelnik

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 …

Member Avatar for deceptikon
0
159
Member Avatar for Alex_20

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.

Member Avatar for ishaan3731
0
277
Member Avatar for ajanah.ibrahim
Member Avatar for 21345572
Re: linq

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.

Member Avatar for mayaestat
0
119
Member Avatar for claush@dut

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 …

Member Avatar for cxzei
0
159
Member Avatar for trannd_55

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.

Member Avatar for ddanbe
0
188

The End.