203 Posted Topics
Re: 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 … | |
Re: 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: … | |
Re: 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, … | |
Re: 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. | |
Re: 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] | |
Re: 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 … | |
Re: 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] | |
![]() | Re: 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 … ![]() |
Re: 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)? | |
Re: 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. … | |
![]() | Re: 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]. ![]() |
Re: 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 … | |
Re: 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 = … | |
Re: 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 … | |
Re: 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] | |
Re: 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. | |
Re: 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.:) | |
Re: 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? | |
Re: 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 … | |
Re: Hello, Peg. Look there: [url=http://msdn.microsoft.com/en-us/library/system.datetime.aspx]DateTime Structure[/url] | |
Re: 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 … | |
Re: 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] | |
Re: 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 … | |
Re: 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 … | |
Re: 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. … | |
Re: Hello, can you post what you have so far? Any tries in code, which 'don't want to work proper'. | |
Re: Hello, try to look at [url=http://msdn.microsoft.com/en-us/library/system.timespan.aspx]TimeSpan Structure[/url]. | |
Re: 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] | |
Re: 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] | |
Re: 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] | |
Re: 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] | |
Re: 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 … | |
Re: 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. | |
Re: 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 … | |
Re: Try this: [url=http://msdn.microsoft.com/en-us/library/tabh47cf.aspx]String.Split Method (String[], StringSplitOptions)[/url]. | |
Re: 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 … | |
Re: 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. | |
Re: 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]. | |
Re: 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 … | |
Re: 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] | |
Re: 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 … | |
Re: 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 … | |
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 … | |
Re: 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 … | |
Re: 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. | |
Re: 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]. | |
Re: 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. | |
Re: [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 … | |
The End.