|
-
Jun 3rd, 2006, 07:28 AM
#1
Thread Starter
Hyperactive Member
[2.0] passing values by ref..got stuck..
I have downloaded a chart control (upon suggestion of one of this board member ).
I am trying to call this chart control and I am not able to progress. can some one take a look at this?
the code in the chart control is like this. this is downloaded code and not mine.
public class g01
{
public g01()
{
}
public void CreateChart(ref Chart chart1)
{
// Set the title.
chart1.Title="My Chart";
}
I wrote this code that calls this CreateChart method. But I don't know how to pass parameters to CreateChart method.
class Program
{
static void Main(string[] args)
{
g01 MSFTChart = new g01();
///next line I am stuck.
MSFTChart.CreateChart(ref Chart);
}
}
-
Jun 3rd, 2006, 07:39 AM
#2
Re: [2.0] passing values by ref..got stuck..
Code:
MSFTChart.CreateChart(ref g01);
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Jun 3rd, 2006, 07:44 AM
#3
Thread Starter
Hyperactive Member
Re: [2.0] passing values by ref..got stuck..
I wrote your code "MSFTChart.CreateChart(ref g01);"
I get the following error
'dotnetChartingSamples.g01' is a 'type' but is used like a 'variable'
what does it mean?
thanks
nath
-
Jun 3rd, 2006, 07:47 AM
#4
Re: [2.0] passing values by ref..got stuck..
So, sorry
Code:
Chart c=new Chart();
g01 MSFTChart =new g01();
MSFTChart.CreateChart(ref c);
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Jun 3rd, 2006, 07:55 AM
#5
Thread Starter
Hyperactive Member
Re: [2.0] passing values by ref..got stuck..
It works as you said.
but I don't see a chart control in the tool box when I installed free chart control. I downloaded from the following site.
http://www.softwarefx.com/GetChartFXLite/
Unless I have a chart control on my windows form, I won't be able to display the contents of the chart.
where can I search and add as a reference?
thanks
nath
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|