|
ahhh. It is Target ArrayList. I think I could not modify my original code properly.
This world is going to explode due to international politics, SOON.
|
|
|
|
|
that's the main problem when you work with ArrayList, Add method simply accepts any object you pass. here you are adding the string[] returned by the source.ToArray operation. to Add the array range you should use array.AddRange.
My personal recommendation is to avoid using ArrayList in your application and use Generic lists.
public void CopySetting(ArrayList mySrcArrayList)
{
myTargetArrayList.Clear();
myTargetArrayList.AddRange(mySrcArrayList.ToArray(typeof(string)));
}
Jibesh V P
|
|
|
|
|
Yeah don't use ArrayList unless there is some good reason you don't want type safety. Even if the initial list is a heterogenous one in this case, so you want an untyped list, you should definitely be using List<String> as the target, since you're only adding strings to it.
|
|
|
|
|
Hello everyone i'm a biginner of c# programming someone can help me to improve my skills. I need sample project to exercise my learning. thank you
|
|
|
|
|
The first place you should try when stuck on something is MSDN. C# Sample Applications[^] is a good p[lace to start.
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
Thank you sir Wayne Gaylard
for your response. It is realy a big help for me to improve my knowledge in programming.
|
|
|
|
|
No Problem.
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
You can learn by reading a few books on C#.
There will be a number of samples that you could try from these books.
|
|
|
|
|
Thank you sir Abhinav S it can help me a lot ....
|
|
|
|
|
You need just practice and practice and practice to improve your skills in this level.
/* LIFE RUNS ON CODE */
|
|
|
|
|
what is encapsulation with c# coding exnmple
|
|
|
|
|
|
I have created a windows form chart and it is very small the only way I can change its size is by stretching the chart but it is only a percentage of the charts container size, I have spent forever going through the properties and I cannot see what is affecting it, here is an image of it:
http://deucalion0.co.uk/chart.PNG[^]
You can see the white are is the size of the chart but it is nowhere near the same size, can anyone tell me why?
Thank you!!
|
|
|
|
|
Without knowing what you're using for a chart control or if you made your own, it's pretty much impossible to help you.
|
|
|
|
|
I apologise for the lack of information in my question!
I am using this:
using System.Windows.Forms.DataVisualization.Charting;
The code for my chart properties in the designer file is as follows:
chartArea1.Name = "ChartArea1";
this.chart1.ChartAreas.Add(chartArea1);
legend1.Name = "Legend1";
this.chart1.Legends.Add(legend1);
this.chart1.Location = new System.Drawing.Point(0, 0);
this.chart1.Name = "chart1";
series1.ChartArea = "ChartArea1";
series1.Legend = "Legend1";
series1.Name = "Plots";
series2.ChartArea = "ChartArea1";
series2.Legend = "Legend1";
series2.Name = "Regression Line";
this.chart1.Series.Add(series1);
this.chart1.Series.Add(series2);
this.chart1.Size = new System.Drawing.Size(1212, 771);
this.chart1.TabIndex = 13;
this.chart1.Text = "chart1";
this.chart1.Click += new System.EventHandler(this.chart1_Click);
I am new to this kind of project So forgive me if there is still something missing.
Thank you!
|
|
|
|
|
The code isn't here, but you may have set the size of the ChartArea1 in the designer to be a fixed size instead of Auto.
I preffer to remove all of the default collection items that dropping the chart object on the form adds, including all Legends, ChartAreas, Series, Annotations, ... and just create everything in code and add them to the appropriate collectiosn manually instead of modifying what's there. I did this without any problems:
Dim chartArea As New ChartArea("TestChartArea1")
chartArea.AlignmentOrientation = AreaAlignmentOrientations.All
chartArea.AlignmentStyle = AreaAlignmentStyles.All
Chart1.ChartAreas.Add(chartArea)
Dim legendArea As New Legend("TestLegend1")
Chart1.Legends.Add(legendArea)
Dim series As New Series("Series1")
series.ChartArea = "TestChartArea1"
series.ChartType = DataVisualization.Charting.SeriesChartType.Line
series.XValueType = DataVisualization.Charting.ChartValueType.Int32
series.YValueType = DataVisualization.Charting.ChartValueType.Int32
For Each p In New Integer() {1, 2, 3, 4}
series.Points.AddXY(p, p)
Next
Chart1.Series.Add(series)
|
|
|
|
|
Hi,
How can i list Country wise banks list in my new web app,
Thanks
|
|
|
|
|
Create a list containing the names and save it in your database. Load the list as required.
|
|
|
|
|
Thanks for your replay Richard.
But actually , i am looking for a solution like with out storing that list in my db.
so i need to know is there any web services or any other options like this available to get the world wide banks list.
eg:- as we can get the city list in a country.
Thanks
|
|
|
|
|
This is hardly a technical question, you should try Google.
|
|
|
|
|
Thanks Richard,
Please post me in case if you got any solutions .
Thanks
|
|
|
|
|
Why do you think that Richard will look for the answer for you? It's your work, not his.
|
|
|
|
|
Hi Pete O'Hanlon,
you please check my post correctly , i have mentioned in that like, 'in case' he got any answer , right?. I know it's my work.I am not asking him to do the task. k.
Thanks
|
|
|
|
|
AFAIK, there's no public list available; you'd have to make (and maintain!) your own.
|
|
|
|
|
Should also note that the solution will likely vary by country.
I suspect also that the usable definition of "bank" might vary as well.
|
|
|
|