203 Posted Topics

Member Avatar for wil0022

Hello, wil0022. Indeed, you [B]can't[/B] do like this: [code=c#] if (final[0] & final[1] & final[2] & final[3] & final[4] & final[5] & final[6] & final[7] & final[8] & final[9] != first[counter2]) [/code] I suppose this construction means "If first[counter2] isn't in the final array .." If so - then the …

Member Avatar for Geekitygeek
0
113
Member Avatar for NT.

Hello. Both ArrayList and List classes are provided to work with dynamic arrays. But, in ArrayList all elements have type of System.Object. And in List you specify the type of elements by yourself. Let's see what it gives to you: 1. Suppose, you have an array of strings. For ArrayList: …

Member Avatar for Antenka
0
216
Member Avatar for DeOiD

Hello, DeOiD. Here's one more way to go .. If choose between Array, ArrayList or List<T> - I would suggest you use List<T>. For keeping such values you can define a class or structure. For example: [code=c#] public class Result { int rowNumber; string fieldName; string value; public Result(int rorNumber, …

Member Avatar for DeOiD
0
287
Member Avatar for tiwas

Hello, tiwas. Split method has a few overloads. Take a look: [url=http://msdn.microsoft.com/en-us/library/system.string.split.aspx]String.Split Method [/url] Instead of using ArrayList I would suggest you look at List<T>. It has a constructor, that can take a IEnumerable<T> as parameter, which is (in your case) the data, which Split method returns.

Member Avatar for Rashakil Fol
0
146
Member Avatar for jatin24

Hello. I was playing with your code. Here's what I've got: [code=c#] // selecting some text in RichTextBox ... Clipboard.SetText(richTextBox1.SelectedRtf, TextDataFormat.Rtf); sel.Paste(); [/code]

Member Avatar for jatin24
0
2K
Member Avatar for EvilLinux

Hello, EvilLinux. At first - you should post your code in code tags. About your code: this should take current date and time [code=c#]DateTime arrivaldate = DateTime.Now;[/code] then troubles comes from here: [code=c#] DateTime departuredate = DateTime.Parse("DateTime.Now"); [/code] to use [B]Parse[/B] method with 1 string parameter, you should use something …

Member Avatar for EvilLinux
0
148
Member Avatar for sephora

Hello. Your trouble may lay here: [code=c#] OleDbDataAdapter oleDbDA = new OleDbDataAdapter(); [/code] try to create your Data Adapter based on your connection: [code=c#] OleDbDataAdapter oleDbDA = new OleDbDataAdapter(selectCommand, connection); [/code]

Member Avatar for sephora
0
128
Member Avatar for buchanan23

Hi. Well, at first - you don't change the "index" variable from the time, when it was created. You should specify the current index (since you're displaying not the first record of your array). The second one - when your prog catch the proper event to process - you're changing …

Member Avatar for buchanan23
0
2K
Member Avatar for tdeck

Yeah .. it also works fine here. P.S. Are you sure, that your file, which lays in [icode]path[/icode] has text in it (maybe this is that simple, that you're overlooking :P)?

Member Avatar for lighthead
0
160
Member Avatar for wingers1290

Hello. You seem a bit enmeshed with variable names and Cotrol names. E.g. let's take a look at TextBox creation: [code=c#] TextBox textBox6 = new TextBox(); textBox6.Location = new Point(260, 120); textBox6.Size = new Size(42, 20); this.Controls.Add(textBox6); [/code] you have a variable named [icode]textBox6[/icode], which keeps your newly created TextBox. …

Member Avatar for Antenka
0
400
Member Avatar for buchanan23

Using "array[number]" you're refer to 1 single element in [icode]array[/icode], which has a position [B]number-1[B] (since the array indexes are starting from 0). If you need to pass whole array - pass just the [icode]bookArray[/icode].

Member Avatar for buchanan23
0
174
Member Avatar for wingers1290

As I understand correctly - you're trying to access dynamically created variable [icode]field2[/icode] outside the borders of it's visibility, rather than TextBox. To locate your dynamically created TextBox you should use this: [code=c#] this.Controls["textBox2"].Text = "I'm here"; [/code] or this: [code=c#] //this method returns Control[], so you should specify the …

Member Avatar for Antenka
0
311
Member Avatar for Eager_Beever

Hello, as far as I understand - the tab pages and child forms are created in the runtime. So probably the solution can be something like this: [code=c#] TabPage tabPage1 = new TabPage("ChildForm1"); //you can use or pre-defined class for this, or just //call upon Form class YourFormClass childForm1 = …

Member Avatar for chathuD
0
189
Member Avatar for akulkarni

Hey, akulkarni. There're some logic errors: 1. [code=java]for(j=5;j>0;j--) { i=0; while(i<5) { int c=arr[i][j]+arr[i][j-1]; System.out.print(c); i++; } System.out.println(); }[/code] Just look what happening e.g. on the first step of your for-cycle: 1. j=5; i=0; you're taking elements with coordinates (row=0; column=5) and (row=0; column=4) .. and returning sum of them …

Member Avatar for Antenka
0
192
Member Avatar for kspriya01

Hello. This might be helpful for you: [url=http://www.aspsnippets.com/post/2009/03/14/Export-GridView-To-WordExcelPDFCSV-in-ASPNet.aspx]Export GridView To Word/Excel/PDF/CSV in ASP.Net[/url]

Member Avatar for Antenka
0
98
Member Avatar for pt0909

Hello, pt0909. To compare values you should use "==". [code=c#]if (RBl1.SelectedValue == "A")[/code]. Also the property of the label, which you trying to access here: [code=c#]mesg.text[/code] should start with the capital letter: [code=c#]mesg.Text[/code] C# is case-sensitive.

Member Avatar for Antenka
1
128
Member Avatar for jrobw

Hello, jrobw. You asked: [QUOTE]or how do I determine, how many levels of recursion I actually need???[/QUOTE] You can offer to user to enter this. And then pass it as a parameter into method.:)

Member Avatar for quuba
0
402
Member Avatar for Manuz

To display image on your form you can use the Picturebox control and the Image class: [code=c#] Image yourImage = Image.FromFile(pathOfYourImage); pictureBox1.Image = yourImage; [/code] Is that what you are looking for?

Member Avatar for Ramy Mahrous
0
614
Member Avatar for Egypt Pharaoh

Hello. There're a few ways to create dll in C#: 1. You can use only compiler ("csc.exe"). [url=http://msdn.microsoft.com/en-us/library/3707x96z(VS.80).aspx]How to: Create and Use C# DLLs (C# Programming Guide)[/url]. 2. Or you can use the abilities or your IDE (e.g. here is an example of creating it in VS 2005) [url=http://snippets.dzone.com/posts/show/3861]Create DLL …

Member Avatar for gbeltrao
0
96
Member Avatar for peggyw

Hello, Peg. Look there: [url=http://msdn.microsoft.com/en-us/library/system.datetime.aspx]DateTime Structure[/url]

Member Avatar for JerryShaw
0
90
Member Avatar for HBMSGuy

Hello, HBMSGuy. Are you sure, that you have error about passing derived class when method asks the base one? Only thing, that I see it's a few mistakes (in other area): [code=c#] Class TaskToRun { public virtual void run (); } [/code] here if you don't specify any functionality to …

Member Avatar for HBMSGuy
0
4K
Member Avatar for jen140

Hello, jen140. If I understand you correctly, here: [code=c#] if (valor.ToString() == "") [/code] you're check if the operation [icode]rk.GetValue(KeyName);[/icode] returned nothing to the 'valor' variable. Try to change it on this: [code=c#] if (valor == null) [/code]

Member Avatar for jen140
0
146
Member Avatar for pjpro

Hello, pjpro. There're some variables/methods in your code, that you use but haven't declared (such as "ListDemo", "display", "enter"). That is the source of the compilation errors. If I was you - I'd use another strategy to develop: 1. Write simple code for client-server interaction. 2. Increasing this code step …

Member Avatar for Antenka
0
1K
Member Avatar for skiing

Hello, skiing. As Ezzaral said, for comparing objects of self-created data types, you need to add realization Comparable interface in that class. In other words - you're kinda saying "The objects of my class, called 'TreeNode" can be compared with each other using CompareTo method." Let's look at example: Suppose …

Member Avatar for Antenka
0
106
Member Avatar for prashantsehgal

Hello, prashantsehgal. This might be helpful for you: [url=http://www.codeproject.com/KB/dotnet/newmicrosoftchartcontrol.aspx]New Microsoft Chart Controls for Web and Windows Forms Applications[/url] [url=http://www.codeproject.com/KB/graphics/zedgraph.aspx]A flexible charting library for .NET[/url] [url=http://www.codeproject.com/KB/WPF/PieChartDataBinding.aspx]A WPF Pie Chart with Data Binding Support[/url] [url=http://www.codeproject.com/KB/WPF/OpenWPFChartLibPart1.aspx]OpenWPFChart: assembling charts from components: Part I - Parts[/url] hope,that that is what you're looking for :) P.S. …

Member Avatar for Antenka
0
125
Member Avatar for foxypj
Member Avatar for Antenka
0
135
Member Avatar for srikanth.cpd

Hello, try to look at [url=http://msdn.microsoft.com/en-us/library/system.timespan.aspx]TimeSpan Structure[/url].

Member Avatar for ddanbe
0
64
Member Avatar for ddanbe

Hello, ddanbe. All you have to do is add your [B]BinCB[/B] to the list of Controls of your form: [code=c#] this.Controls.Add(this.BinCB); [/code]

Member Avatar for Antenka
0
104
Member Avatar for gluttonous

Hello, in your case you should at first initalize array1[0], and the access it variable 'array2[0]'. [code=c#] array1[0] = new MY_TYPE2(); [/code]

Member Avatar for gluttonous
0
104
Member Avatar for konczuras

Hello, konczuras. I think that this article will help you to make out with using reference and value types and ways of passing them into methods:[url=http://msdn.microsoft.com/en-us/library/0f66670z(vs.71).aspx]Passing Parameters[/url]

Member Avatar for skatamatic
0
87
Member Avatar for VelcroMan

Hello, VelcroMan. There is one (that I know) method to do that. Here: [url=http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex.unescape(vs.71).aspx]Regex.Unescape Method[/url] P.S. But you should pay attention on this part: [QUOTE=MSDN] Of course, Escape cannot perfectly reverse Unescape because it cannot deduce from an unescaped string which characters may have been previously escaped. [/QUOTE]

Member Avatar for Antenka
0
73
Member Avatar for milgo

Hello, milgo. You have in your program definition of a [B]Product[/B] class. And as far as I understood, you was going to use it in [B]Inventory[/B] class. But instead of that, you're creating an instance of [B]Item[/B]: [code=java] //Instantiate an Item object Item myItem = new Item(); [/code] By the …

Member Avatar for BestJewSinceJC
0
165
Member Avatar for charlie81

Hello, charlie81. Well, you have class [B]Main_Class[/B], which has method [icode]public static void main(String[] args)[/icode] (which is an entry point into your program). And in that method you're defining new class with it's own entry point. In the program can be only one method main.

Member Avatar for jasimp
0
159
Member Avatar for kbullard516

Hello, kbullard516. I was playing around with your code. Here's what I have so far: (simply I've turned your words in code :P ) [code=java] public int compareTo(Object other) { String otherName = ((Item)other).getName(); eCategory otherCategory = ((Item)other).getCategory(); int otherQuantity = ((Item)other).getQuantity(); double otherPrice = ((Item)other).getPrice(); //if category's are equal …

Member Avatar for kbullard516
0
156
Member Avatar for mansi sharma

Try this: [url=http://msdn.microsoft.com/en-us/library/tabh47cf.aspx]String.Split Method (String[], StringSplitOptions)[/url].

Member Avatar for JerryShaw
0
92
Member Avatar for cause&effect

Hello, cause&effect. Just to add to Rashakil Fol's words: your array2 is specific view of your gaming board. That mean, that every value in it depends not only on who belongs the turn to, but also on a position, where to store 'X' or 'O'. You already use that to …

Member Avatar for Antenka
0
93
Member Avatar for ProgrammersTalk
Member Avatar for drfarzad

Hello, drfarzad. 1. You call the [icode]Console.ReadLine();[/icode] and don't assign the value, entered by user to any of variables. 2. You miss a letter in the word 'Conver[B]t[/B]'. 3. You don't 'memorize' any of the pressed keys. 4. Same as in 3.

Member Avatar for rapture
0
144
Member Avatar for rasingh24

Hello, rasingh24. I suppose, this should be helpful for you: [url=http://msdn.microsoft.com/en-us/library/system.windows.forms.treevieweventargs.node.aspx]TreeViewEventArgs..::.Node Property[/url] P.S. All you have to do to get any data of the selected node - is extract it from [icode]e.Node[/icode].

Member Avatar for rasingh24
0
905
Member Avatar for C#Newbie

Hello, C#Newbie. If I were you, I'd probably made some changes in format of the file. E.g. place info about single friend on a single line (using specific separator between the fields, like tabulation symbol, or something like that). So if we'd have 10 friends - it would be 10 …

Member Avatar for Antenka
0
1K
Member Avatar for C#Newbie

Hello, C#Newbie. Try to add [url=http://msdn.microsoft.com/en-us/library/system.io.streamwriter.flush.aspx]Flush[/url] before closing your StreamWriter. in your case it's: [code=c#]output.flush();[/code]

Member Avatar for C#Newbie
0
519
Member Avatar for jobi116

Hello, jobi116. [QUOTE=jobi116]how to make all the child node checked when parent node is checked. i tried this but only first 2 child nodes get checked.. here's what i tried.[/QUOTE] Here is an example: [url=http://osdir.com/ml/windows.devel.dotnet.cx/2004-07/msg00006.html]Check child nodes in a tree view control[/url] [QUOTE=jobi116]how to bring the system directory's in tree …

Member Avatar for jobi116
0
107
Member Avatar for cicigirl04

It happened because you calling maxF and maxC methods before you are filling arrays inputFahr and inputCel with data. And your maximum goes through arrays, filled by default values (in your case it's zeros). And one more thing: (correct me if I'm wrong) you want the user to input each …

Member Avatar for arseniew
0
493
Member Avatar for Antenka

Hello, everybody. I have typed DataSet ([icode]dsMain[/icode]), that contains table ([icode]ReferenceCycle[/icode]). In the program I make changes in that table, using generated by VS typed table adapter ([icode]taReferenceCycle[/icode]) and values seems to gets inserted. And when I'm trying to update database with this - nothing happens. Here's part of my …

Member Avatar for Ramy Mahrous
0
656
Member Avatar for kos88

When you do this: [code=java]Person vn = new Person("dingh","Ding");[/code] you initialize only two fields, calling this: [code=java] Person(String brukernavn, String navn) { this.brukernavn = brukernavn; this.navn = navn ; } [/code] and on the stage, when you trying to print info, you ask this [code=java] Venn p = forstevenn; while(p …

Member Avatar for Kabbelabb
0
186
Member Avatar for JackDurden

When you call this: [code=c#] tail = Counter(tail); [/code] variable [B]tail[/B] not gonna change. Your initial value of [icode]tail[/icode] is [B]0[/B] and if you'll divide it by some number - it will give you 0.

Member Avatar for Ramy Mahrous
0
113
Member Avatar for winky

Hello, winky. I don't see definition of groupBoxes in your code. Before using variable, you should define it with some type, like you do this here: [code=c#] WeatherForecasts weatherForecasts; [/code] For initializing GroupBox you could use example from here: [url=http://msdn.microsoft.com/en-us/library/system.windows.forms.groupbox(VS.85).aspx]GroupBox Class[/url]. Also about other components: [url=http://msdn.microsoft.com/en-us/library/system.windows.forms(VS.85).aspx]System.Windows.Forms Namespace[/url].

Member Avatar for LizR
0
228
Member Avatar for ddanbe

Check for this (msdn): [QUOTE]If visual styles are enabled and EnableHeadersVisualStyles is set to true, all header cells except the TopLeftHeaderCell are painted using the current theme and the ColumnHeadersDefaultCellStyle values are ignored.[/QUOTE] I've tried to set the [B] EnableHeadersVisualStyles [/B] to [B]false[/B] and it's working.

Member Avatar for ddanbe
0
339
Member Avatar for daddanakunadan

[QUOTE=daddanakunadan] but this displaying column name as "length" and its values are numeric.How can solve this problem. [/QUOTE] [url=http://www.devx.com/dotnet/Article/33748]Here[/url] you can find the answers. There examples on VB, but good explanation of why that happens and how to solve it. Hope it will help you.. [QUOTE=daddanakunadan] Can we add click …

Member Avatar for Antenka
0
102
Member Avatar for Rashakil Fol

The End.