4,439 Posted Topics

Member Avatar for spowel4

Or you could drop your data in a DataGridView and use some of the many properties and methods of this rather big, but very usefull object. [See this example.](http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.sortedcolumn.aspx)

Member Avatar for TnTinMN
0
226
Member Avatar for Subha1983

If you are using Visual Studio, you could drag a TextBow in a Forms application. See in the generated files how VS does it and act accordingly.

Member Avatar for ddanbe
0
189
Member Avatar for jameosa

For all I know, leave IT and start a candy shop! In the other case, do your homework and ask a question if you get stuck with it. We will be ever so happy to give you any help :o)

Member Avatar for pritaeas
0
265
Member Avatar for venus87
Member Avatar for ddanbe
0
237
Member Avatar for Mz. Jackee

Why not learn something about division ande remainder operators in C#? [Learn!](http://msdn.microsoft.com/en-US/library/ms173145(v=VS.100).aspx)

Member Avatar for tinstaafl
0
102
Member Avatar for AquaNut

This seems to mean that DataRecords is somehow empty and so doc.Elements is probably empty also. Did you check that?

Member Avatar for nmaillet
0
358
Member Avatar for thechampp

In searching the web about list sorting, I stumbled upon [this masterpiece!](http://weblogs.asp.net/kiyoshi/archive/2009/02/17/render-aspx-page-as-string.aspx)

Member Avatar for tinstaafl
0
346
Member Avatar for Reverend Jim

Indeed Reverend Jim, the fact that he came with a steamboat from Spain with oranges and Zwarte Piet, was "invented" in the Netherlands! The fact that Santa Claus wears his typical red-white suit, comes from [Coca-Cola advertising](http://www.coca-colacompany.com/stories/coke-lore-santa-claus) in the beginning of the previous century.

Member Avatar for Reverend Jim
2
208
Member Avatar for rotten69

I don't know, but I do know the *this* keyword of C# is a feature C# took over from Java. Just like C# took over lot of syntax from the C programming language family.

Member Avatar for ChrisHunter
0
166
Member Avatar for rotten69

The .NET framework is already rich enough in datastructures to serve all your basic programming needs. Learn from it through MSDN. If you can't find what you want, you could start thinking about your own datastructures. Plenty of stuff on the web. This is an [example.](http://www.codeproject.com/Articles/16337/Back-to-Basics-Generic-Data-Structures-and-Algorit)

Member Avatar for ddanbe
0
222
Member Avatar for filxy

You probably have some Data file to read from. Read it line by line in a loop. If you put in the data manually,[this](http://www.daniweb.com/software-development/csharp/code/371819/code-template-for-a-menu-in-a-console-application) might help.

Member Avatar for tinstaafl
0
227
Member Avatar for waddaharafeh

Why on earth do you think I should do your homework? What have you tried for yourself and what problems have you encountered? Post a question about that and we will try to solve it. *(Think I'm gonna make a template of the above text . . .)*

Member Avatar for peter_budo
0
227
Member Avatar for Brick Wall

Can we have code for GetPrecipitationPeriod? Line 6 will only recieve line 5, not line 4.

Member Avatar for ddanbe
0
164
Member Avatar for ironbrew
Member Avatar for ironbrew

The Console class also has a [SetCursorPosition method](http://msdn.microsoft.com/en-us/library/system.console.setcursorposition(v=vs.90).aspx)

Member Avatar for ddanbe
0
399
Member Avatar for nmakkena

A form doesn't close by itself. Could you send your code with the eventhandler of the button?

Member Avatar for 03hasnam
0
3K
Member Avatar for JesGo

This is a [code snippet](http://www.daniweb.com/software-development/csharp/code/364073/how-to-set-up-a-modal-dialog-form) I posted some time ago. I hope it can help.

Member Avatar for ddanbe
0
132
Member Avatar for sunil5

You could write your property starting on line 40 in one line. It is called an auto-implemented property. It goes like this: **public int counter { get; set; }** Don't know exactly what your problem is, could you tell us a bit more?

Member Avatar for Momerath
0
203
Member Avatar for S2009
Member Avatar for six_sic6
0
326
Member Avatar for <M/>

In my country(Belgium) the colors purple and black are related to mourning. So I agree with with A.D. : put in some polka dots! :)

Member Avatar for diafol
0
414
Member Avatar for PickledPeppers6

MSDN is a great resource to get started. In [this article](http://msdn.microsoft.com/en-us/library/aa288453(VS.71).aspx) you will find info on how to convert your DEPTS array on line 8 into a legitimate C# line. Success!

Member Avatar for ddanbe
0
216
Member Avatar for nblackburn

What about a [Backgroundworker](http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker(v=vs.95).aspx)?

Member Avatar for tinstaafl
0
186
Member Avatar for melvic.gauci

Your code is structured very bad. Where is Main? At least I (perhaps some more clever folks around here?) cannot figure out what you really want, with the code you gave.

Member Avatar for Momerath
0
174
Member Avatar for armaandani
Member Avatar for ddanbe
0
83
Member Avatar for nitin1

It are all just numbers and their representation. There is really nothing more to it. What about 101010 in binary? 10 october 2010? Or the well known number 42 (decimal) from [The Hitchhiker's Guide to the Galaxy](http://en.wikipedia.org/wiki/42_(number))?

Member Avatar for nitin1
0
170
Member Avatar for advcha.almahyrah

Well, [this](http://www.daniweb.com/software-development/csharp/code/231400/chasing-lights-running-ants) is perhaps not exactly what you want to achieve, but it might give you some ideas.

Member Avatar for advcha.almahyrah
0
140
Member Avatar for Ben Ashton

Put a transparent form over your existing form. Select a region in the transparent form by handling some mousedown and mousemove and mouseup events. Handle this region in your original form and remove the transparant one. I had a project once that did that, if I can find it I …

Member Avatar for Ben Ashton
0
140
Member Avatar for diya45
Member Avatar for ddanbe
0
159
Member Avatar for Darth Vader
Member Avatar for tony75

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication6 { class Program { static void Main(string[] args) { double[] MyArray = new double[]{10,9,5,77,45,23,12,5,88,49}; double wrecked = MyArray.Average(); int lowerthanAv = 0, higherthanAv = 0; for (int i = 0; i < MyArray.Length; i++) { if (MyArray[i] < wrecked) lowerthanAv++; …

Member Avatar for tony75
0
1K
Member Avatar for visweswaran28
Member Avatar for tony75
Member Avatar for ddanbe

LINQ is a great extension to the C# language! But it can be terrifying at first. So here is a little snippet just to get your feet wet. You would normally use some sort of looping here. See how easy it is to get some values from an array. Enjoy

Member Avatar for claventure
0
182
Member Avatar for galhajaj

Hi Galhajaj, welcome at daniweb :) Your problem is you defined an array to make place for 8x8 squares, but you did not define the square objects. Look: [CODE=c#]public partial class Form1 : Form { Square[,] square = new Square[8, 8]; public Form1() { InitializeComponent(); int i, j; for (i …

Member Avatar for thousandbanks
0
1K
Member Avatar for BigHeart

Your question is not very clear to me. Is the barcode 41/3/100 saved in its totality or did you just saved 100 in the DB? Which button do you click? Please clarify. The string class has a method called SubString.

Member Avatar for notconfirmed
0
147
Member Avatar for handsome89

This boils down to: I'm a male person. I want to continue my life with a woman partner, but I cannot find one. Please provide me one. There are some things in your life you got to do for yourself!

Member Avatar for caKus
0
160
Member Avatar for mr.white

I use the Home Planet program from here [url]http://www.fourmilab.ch/homeplanet/[/url] wich shows what you want. (It is free) You can download the source code in C.

Member Avatar for vdavid
0
486
Member Avatar for mohammad.r.khani

Hi Mohammad, welcome. Please elaborate on your question. Do you use Visual Studio? I'm inferring you use C#, is this correct? Do you know what ADO.NET is?

Member Avatar for ddanbe
0
35
Member Avatar for keyd
Re: c#

Hi keyd! Welcome here. Have you had a look at [this](http://www.daniweb.com/software-development/csharp/threads/437362/getting-started-with-c-the-list)?

Member Avatar for ddanbe
0
32
Member Avatar for alvy

Have a look at [this](http://www.daniweb.com/software-development/csharp/threads/437362/getting-started-with-c-the-list)

Member Avatar for JOSheaIV
0
152
Member Avatar for clever.forextrading

Indeed, weathernews is nowhere defined in your code. In this case(No pun intended) you are better off with an if elsif statement I guess. Happy programming!

Member Avatar for ddanbe
0
103
Member Avatar for meaganicole
Member Avatar for ddanbe
0
213
Member Avatar for WolfShield

If you select a Form.cs file (the one above the Form.Designer.cs file) you should see appear a small square button in the solution explorer. If you hover over it it says: "View Designer"

Member Avatar for Momerath
0
1K
Member Avatar for stefano.a.feltre

You are adding 5 times the number 5 which adds up perfectly to 25.(See Momerath) Computing machines are very dumb, the only do what you ask them to do. :)

Member Avatar for Momerath
0
149
Member Avatar for pallavi_panalia

Have a look in the code snippet section. Something like [this](http://www.daniweb.com/software-development/csharp/code/217193/passing-data-between-forms)

Member Avatar for ddanbe
0
104
Member Avatar for Ismail Issa

Why are you mixing a Forms application with a Console application? And most important where or what is the error?

Member Avatar for JOSheaIV
0
99
Member Avatar for Doogledude123

I think the long startup time has to do with the fact that all the resources for all the languages have to be loaded in some way.If you do most of your programming in C++ and never have any plans to program in say F#, you should be able to …

Member Avatar for deceptikon
1
266
Member Avatar for ddanbe

For anyone who likes to do something with sets in C#, this can be a starting point. The full project (VS 2010) is also included. Have fun with programming!

0
307
Member Avatar for MARKONINI

Do not understand "year 12" very well. Does it mean you are 12 years old or (starting school at 6), 18 years old? Both of your proposals look good to give it a try.

Member Avatar for Momerath
0
336
Member Avatar for Ismail Issa

Make use of the [HashSet collection class](http://msdn.microsoft.com/en-us/library/bb359438.aspx)

Member Avatar for ddanbe
0
116

The End.