4,439 Posted Topics

Member Avatar for virendra_sharma

Have a look at these snippets: [url]http://www.daniweb.com/software-development/csharp/code/351309[/url]

Member Avatar for ddanbe
0
101
Member Avatar for Arjun_Sarankulu

You will find all the info you need here: [url]http://msdn.microsoft.com/en-us/library/system.io.streamreader(v=VS.100).aspx[/url]

Member Avatar for ddanbe
0
59
Member Avatar for neoic91

You could start having a look at this: [url]http://www.daniweb.com/software-development/csharp/threads/352156[/url]

Member Avatar for neoic91
0
90
Member Avatar for Usmaan

[QUOTE=Xcelled194]But this isn't the place for a debate over NET vs Regex.[/QUOTE] So why did you start one? You cannot compare .NET with regex. Also have a look at sed, awk and grep. Also have a look at the regex variants for Perl, Ruby, PHP, Python, C, Java.

Member Avatar for Nick Evan
0
182
Member Avatar for valter

Only have an answer for your second question. Use the newer ToolStripMenuItem instead of MenuItem. ToolStripMenuItem allows you to set the Font property at runtime.

Member Avatar for ddanbe
0
84
Member Avatar for rannamaa

If the type of [B]answere [/B]is string then you must compare against a string. 'j' and 'J' are of type char. To make them string, use "j" and "J".

Member Avatar for rannamaa
0
95
Member Avatar for mrjohnka
Member Avatar for Xcelled194
0
157
Member Avatar for Joey_Brown
Member Avatar for shack99

Another "bad" thing is to use short variable names like a or b. Call them TitleStr or AuthorStr or something more meaningfull. Short variable names may seem harmless here, they will kill you in code of a 1000 and more lines! On line 52 change a + "\n" + b …

Member Avatar for shack99
0
125
Member Avatar for sdhawan

The open file dialog returns a file name. Directory.GetFiles expects a path to a directory, not a file. Use the folderBrowserDialog instead, something like this: [CODE=C#] private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1; this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog(); if (this.folderBrowserDialog1.ShowDialog() == DialogResult.OK) { string folderName = folderBrowserDialog1.SelectedPath; string[] names = Directory.GetFiles(folderName); //more code... }[/CODE]

Member Avatar for ddanbe
0
211
Member Avatar for gunnerone

Smells like . . . you asked this before [url]http://www.daniweb.com/software-development/csharp/threads/352641[/url]

Member Avatar for neoic91
0
257
Member Avatar for ajinkya112

I used [url=http://www.codeproject.com/KB/printing/datagridviewprinter.aspx]this code[/url] once in a small project and it worked perfectly. Done a little modification, but that had to do with what I wanted to do, not because the code was bad.

Member Avatar for ajinkya112
0
2K
Member Avatar for NOVICE3

[QUOTE=NOVICE3]if (responsibleDialogResult != DialogResult.Cancel)[/QUOTE] Is it so hard to say [B]if (responsibleDialogResult == DialogResult.OK)[/B] ? What is [B]tempArray [/B]?

Member Avatar for zachattack05
0
109
Member Avatar for hopefree

With the help of LINQ this is easy: [CODE=C#]static void Main(string[] args) { string[] first = { "John", "Dave", "Mary" }; string[] second = { "Danny", "Nicole", "Mary" , "James"}; IEnumerable<string> intersect = first.Intersect(second); Console.WriteLine("*** First array:"); foreach (string name in first) Console.WriteLine(name); Console.WriteLine("*** Second array:"); foreach (string name in …

Member Avatar for Mitja Bonca
0
157
Member Avatar for NewOrder

chessPics is a 2D array that can hold 81 PictureBox elements. You still have to allocate these elements. Example [B]chessPics[0, 0] = new PictureBox();[/B] will do that for the first element in your array.

Member Avatar for ddanbe
0
146
Member Avatar for pseudorandom21

I had a similar problem, have a look [url=http://www.daniweb.com/software-development/csharp/threads/224213]at this thread[/url] You just have to put your DataGridViewData in a DataSet. Maybe it helps.

Member Avatar for pseudorandom21
0
112
Member Avatar for Kath_Fish

WHAT error? WHERE did it occur? How do you expect us to give you an answer? If you post something that is vague, hazy and not even a question but a sentence formulated as a statement?

Member Avatar for agugglez
0
267
Member Avatar for gogs85
Member Avatar for zachattack05
0
1K
Member Avatar for simagen

Perhaps by using some boolean and logic operators in C#, you could write a logical gate simulator in C#!

Member Avatar for abelLazm
0
201
Member Avatar for NewOrder

You created two different 2D arrays named [B]temp [/B]and [B]pieces [/B]each consisting of 81 objects of type [B]Pieces[/B].

Member Avatar for ddanbe
0
119
Member Avatar for Kath_Fish
Member Avatar for Momerath
0
182
Member Avatar for Kath_Fish
Member Avatar for Momerath
0
343
Member Avatar for Falcon25

Hello Falcon25, welcome. What do you think should be the type of your elements array in your posted code? You will also need some kind of looping, here is a start: [url]http://msdn.microsoft.com/en-us/library/ch45axte.aspx[/url]

Member Avatar for ddanbe
0
157
Member Avatar for Macko888

What do you mean by tough? I once found for example properties in C#, a bit hard to grasp. Now I wonder why I could ever have done without them.

Member Avatar for ddanbe
0
55
Member Avatar for iThink

Hello iThink, welcome! You could set the cursorposition. have a look here: [url]http://msdn.microsoft.com/en-us/library/system.console.setcursorposition(v=VS.85).aspx[/url]

Member Avatar for ddanbe
0
97
Member Avatar for Usmaan

It boils down to this: [url]http://msdn.microsoft.com/en-us/library/system.string.indexof(v=VS.90).aspx[/url] If I where you I should print a list of the string members class, enlarge and print it out. Hang it in your room. This will help you out alot of times believe me.

Member Avatar for ddanbe
0
514
Member Avatar for JudeV

Perhaps a peek at [url=http://www.daniweb.com/software-development/csharp/code/238279]this snippet[/url] may set you on the way.

Member Avatar for divin757
0
763
Member Avatar for ddanbe

The DataGridView class is huge and complex. It is a beast I'm still struggling with, but once you learn to comprehend it, I find it most rewarding! Some try to circumvent it by using listboxes and the lot. Why don't get your feet wet with this as basic as it …

Member Avatar for ddanbe
2
1K
Member Avatar for dennysimon
Member Avatar for ddanbe

The next code from the book "Pro-linq language itegrated query in C# 2008" gives a casting exception error on line 29. I know ToArray returns an array of objects, which are in fact of type Employee so why it generates an error? [CODE=C#]public class Employee { public int id; public …

Member Avatar for ddanbe
0
143
Member Avatar for Jessurider

The first computer I worked with at home was [url=http://en.wikipedia.org/wiki/Texas_Instruments_TI-99/4A]this one[/url] It runned at a clockspeed of 3 MHz. And 3 MHz was fast in these days! The computer I'm typing this on runs at 2.2 GHz. So the overhead of calling a method really does not matter that much. …

Member Avatar for ddanbe
0
115
Member Avatar for hypeh

I worked out this, but this is perhaps not what you want. [CODE=c#]using System; using System.Collections.Generic; using System.Linq; using System.Xml.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { XElement Refs = XElement.Parse( @"<References> <sport> <type>football</type> <Info>11 man team</Info> </sport> <sport> <type>tennis</type> <Info>40 love</Info> </sport> <sport> …

Member Avatar for hypeh
0
189
Member Avatar for MrCapuchino

It works if you add a space to your char array [CODE=c#]char[] cInvalid = { '\', '-', '/', '*', '?', '<', '>', '|', ' '}; [/CODE] I guess Trim defaults to whitespace trimming if it can't find a char to trim in the cIvalid array.

Member Avatar for MrCapuchino
0
258
Member Avatar for MrCapuchino

Just to add: In the Build menu you will find the Publish item, that starts a wizard.

Member Avatar for Momerath
0
126
Member Avatar for gunnerone

I would create a Customer, Account and a Transaction class. A Customer class would have a List<Account> and an Account class would have a List<Transaction>

Member Avatar for ddanbe
0
302
Member Avatar for nadav64
Member Avatar for xxxtian
Member Avatar for xxxtian

I guess when you say "the conditions stops" mean you are not entering the if statement. This can only mean one thing: [B]specifypurposetb.Text.Length [/B]is not equal to zero.

Member Avatar for xxxtian
0
126
Member Avatar for Arjun_Sarankulu

In the Build menu you will find a Publish item. Click on it and a wizard will start that will guide you through the process. If it is a simple application you could look in the bin folder of your project. If you compiled your app in release mode, you …

Member Avatar for ddanbe
0
71
Member Avatar for AngelicOne

Call the forms Close() methods of both forms. If you no longer need the forms you cold call the Dispose() methods.

Member Avatar for AngelicOne
0
117
Member Avatar for Arjun_Sarankulu

Have a look at this: [url]http://msdn.microsoft.com/en-us/library/system.windows.forms.filedialog.filename.aspx[/url]

Member Avatar for RobbertKeesing
0
213
Member Avatar for vedro-compota

pArray is short for personArray I guess. pArray stands indeed for an array of Person. You can pass an array of Person to the constructor of the People class. Because the People class inherits from the IEnumerable interface it has to implement its methods.

Member Avatar for vedro-compota
0
142
Member Avatar for Nivass

A ContextMenuStrip with shortcut keys!?! You come from outer space and have three hands,right? One hand to hold the right mouse button, the two others for typing the shortcut key combination? Or do I see this all wrong and am I just being dumb?

Member Avatar for ddanbe
0
129
Member Avatar for Zephyr-

Alternatively you could use a Random constructor with a different integer seed value. public Random randomizer = new Random(seedGrey1);

Member Avatar for ddanbe
0
128
Member Avatar for WASDted

The rejection of the geocentric over the heliocentric model by [url=http://en.wikipedia.org/wiki/Galileo_galilei] this man[/url] merely doing some scientific observations with a telescope was a start.

Member Avatar for JamieLynnSEO
8
492
Member Avatar for Ancient Dragon

Reminds me that somewhere in the seventies of the previous century, I saw [url=http://en.wikipedia.org/wiki/Soylent_Green]this movie.[/url] Still 11 years to go... [COLOR="Green"]"Soylent Green is PEOPLE!! We've got to stop them—SOMEHOW!!!"[/COLOR] Edit: I still know how to kill and prepare a living chicken. It should be teached at school!

Member Avatar for bumsfeld
0
150
Member Avatar for Dheerajpro

Have a look here: [url]http://www.daniweb.com/software-development/csharp/code/217265[/url]

Member Avatar for ddanbe
0
50
Member Avatar for ChrisHunter

Or you could try [CODE=c#]DateTime dt = DateTime.Parse((reader["dtFrom"]).ToString()); [/CODE]

Member Avatar for ChrisHunter
0
181
Member Avatar for muzikhera
Member Avatar for ddanbe
0
73
Member Avatar for yousafc#

Ever heard of the word google? Example: [url]http://msdn.microsoft.com/en-us/library/system.windows.forms.progressbar.aspx[/url]

Member Avatar for ddanbe
0
29

The End.