|
Well ArrayList has objects in it so you probably have to cast to ArrayList before doing [0] again:
(ArrList_Main[0,0][0] as ArrayList)[0]
|
|
|
|
|
Steve,
Thank you so much. That worked like a charm.
Thanks Kalyan
|
|
|
|
|
I am writing an file broswer and can't seem to get the copy method of the file class to work. The file is copyed to the specified directory but the file contents are gone! I've created a new file at the destination, then used the File.Copy method, putting in the pathnames of the file to copy and the destination file i created earlier. Any ideas?
Thanks in advance!
|
|
|
|
|
hi
i have a screen with customer details on it. for some items i only want to make a combobox available. eg. country - this will hold a defined list of countries. my question is how i set up the datasource etc. on this combo. of course, when opening the screen, i want the existing value for this customer to be shown, eg. UK. but the actual source values of the combo should come from another table - eg. the countries table.
i'm a little confused on how to set this up, any help appreciated.
rgds,
barry
|
|
|
|
|
Hi!
Are you saving the complete name of the country or its code in the customer detail?
Or
what columns the country table contains?
|
|
|
|
|
please i need the answer for this problem using c#.
i believe it is a very famous one but i can not get the code.
the problem is down here
Problem:
Christmas is near, and Goostavo is preparing to buy Chriastmas presents!
He has one problem though, and you will have to help him with that.
Goostavo still doesn't know for how many people is he going to buy
presents. He also doesn't know his budget, and how big bag he is going to
carry for the presents. Actually, Goostavo doesn't know anything at all,
right now.
When Goostavo finds out all of those three things, he will have to go and
buy the presents. He must buy equal amount of presents for each person,
otherwise someone may get offended! He also wants to spend as much
money from the bugest, as possible!
You will have to write a function, that will calculate the maximum amount
of money he is going to spend from his budget.
Here is what you will be given:
1) The amount of money Goostavo has for spending.
2) The volume of the bag, in which he will carry the presents.
3) The number of people he has to buy presents for.
4) The number of presents in the store.
5) Volume and price for each present.
The function will look like that:
public static float Contest7(float budget, float bagVolume, int people, int
Npresents, float [] presentVolume, float [] presentPrice);
Example input:
budget = 183.23
bagVolume = 64.11
people = 7
Npresents = 12
presentVolume[0] = 4.53
presentPrice[0] = 12.23
presentVolume[1] = 9.11
presentPrice[1] = 45.03
presentVolume[2] = 4.53
presentPrice[2] = 12.23
presentVolume[3] = 6.00
presentPrice[3] = 32.93
presentVolume[4] = 1.04
presentPrice[4] = 6.99
presentVolume[5] = 0.87
presentPrice[5] = 0.46
presentVolume[6] = 2.57
presentPrice[6] = 7.34
presentVolume[7] = 19.45
presentPrice[7] = 65.98
presentVolume[8] = 65.59
presentPrice[8] = 152.13
presentVolume[9] = 14.14
presentPrice[9] = 7.23
presentVolume[10] = 16.66
presentPrice[10] = 10.00
presentVolume[11] = 13.53
presentPrice[11] = 25.25
Note
1) There can be two or more presents with equal price and volume!
2) The amount of presents in the store will always be greater to the
amount of people Goostavo has to buy presents for.
3) Remember: Goostavo can buy more than one present for each person,
but the amount of presents he gives to each person must be equal! i.e.
everyone gets 1 present, or everyone gets 2 presents, and so on...
4) Remember: Goostavo need to spend AS MUCH money as possible, but
not go over the budget!
M
|
|
|
|
|
Lol, I especially like the method name
|
|
|
|
|
and I thought the "do my homework" posts were the hieght of patheticness.
|
|
|
|
|
Goostavo needs to do his own homework...
|
|
|
|
|
Thats actually quite a good homework question, not too easy and not a million miles away from real-world kind of requirements for a quick algo.
WHen you run into difficulties, post your code and im sure someone here would be happy to help out.
|
|
|
|
|
J4amieC wrote: Thats actually quite a good homework question, not too easy and not a million miles away from real-world kind of requirements for a quick algo.
Except that it's not a homework question. Look at the required name of the method, it's for a programmaing contest of some sort.
|
|
|
|
|
Hi
There are allot of tools around for displaying stock charts, I was wondering if there is anything free out there that includes source code ?
Gilad.
|
|
|
|
|
yes u can get it from visifire.com
|
|
|
|
|
Hi
I'd like to write .net application which can upload photos selected in the explorer to my blog. I wrote some simple app which takes file name as parameter. Next I've built setup and added file action (association) with JPG and Send action to my application.
Everything seems to be ok, but it isn't.
It works, but only if I select ONE file (or just click on the photo) and choose Send.
I'd like to have the ability to select multiple files.
I have been sarching for clues for a half day and still have no idea how to do that.
Any suggestions?
Thanks
h.
|
|
|
|
|
Hi Guys,
Im trying to create an C# application which will take data from an excel sheet and plot onto a line graph.
I have looked a number of graphing classes (e.g. ZedGraph) but cant seem to figure out how i would take data from a spreadsheet and then display it within a graph.
Has anyone have any experience with doing this type of thing.
Really would appreciate your time and help with this,
Joe
|
|
|
|
|
Export the excel spreadsheet as a csv, open this file with your program, parsing it and adding the points to the points (or similar) collection in the graphing package et voila!
Ed
|
|
|
|
|
I`ve just written my own user control which is inherited from RichTextBox control. This control has it own property called RegularExpression.
private string regularExpression;<br />
<br />
[Category("Behavior")]<br />
[Description("Wyrazenie regularne sprawdzające poprawność danych")]<br />
public string RegularExpression<br />
{<br />
get<br />
{<br />
return regularExpression;<br />
}<br />
set<br />
{<br />
regularExpression = value;<br />
}<br />
}
With this property I set up the regular expression which validates my data in control.
My problem is that I want set up this property by clicking my control`s context menu (a new window form with textBox to set up regular expression in it) like in the picture:
Click here...
After clicking OK button I want to set up RegularExpression property with context in textBox. In main application in not a problem. The problem apprears when I want do this the way I,ve just described...
I can`t create reference:
private void okButton_Click(object sender, System.EventArgs e) <br />
ValidatingEditControl.KKEditControl.regularExpresson = this.regExpTextBox1.Text;<br />
}
It dispays: "ValidatingEditControl.KKEditControl.regularExpresson is inaccesible due to its protectionlevel".
Can anyone help me with this?
-- modified at 8:21 Monday 20th March, 2006
|
|
|
|
|
regularExpression is private.
Use 'RegularExpression' which is public.
|
|
|
|
|
HI guys
I'd like to highlight particular words in a richtext box at run time. Similar to how MS Word highlights errors. So far when I try highlighting a word....all text in the control gets highlighted....
Any ideas
Many thanks
MGitosh
|
|
|
|
|
MyRichTextBox.SelectionFont = new Font("Tahoma", 12, FontStyle.Underline);
|
|
|
|
|
Hi frnds,
I want to add licensing feature to my C# .NET windows application.
Need to know how to add license keys and to use them for licensing purposes.
Although there are third party applications available, I need to create my own application
Any kind of help/tips are appriciated
happy coding !
- Prasadd
|
|
|
|
|
|
Thank u !
But, i've already read this article.
I am trying to implement licensing by using a simple Key (an alphanumeric field) which can be set while generating the Key and this Key will be compared while checking for the license
can u plz help me with this ?
Thank u
- Prasadd
|
|
|
|
|
Hi,
I'm trying to create a windows application which has non rectangular shapes. (Some thing like Media player). There is an article in MSDN, but they mentioned that there are some issues. I'm also facing them. So please advice me on how to do this?
MSDN link :http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskCreatingNon-StandardShapedWindowsForms.asp
My mail address is amilacp@gmail.com
Thanks,
Amila
Amila
|
|
|
|
|
To achieve this u have first create a image which contains of the shape u want to give to ur application, and set the outer region with some color (Black), now set the background image of the form to this image, set the
transparency key to the color that u have set to the image's outer region
i.e. Black, Change the formborderstyle to None,
this will work for u.
Regards,
Pramod
|
|
|
|