Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I am going to learn C# 2

Status
Not open for further replies.

jslmvl

Vendor
Jan 26, 2008
268
GB
Hello,

I want to learn C#. Can you tell me what software I should install? My system is Vista.

Thanks a lot.
 
When I start to learn, can I start from form, controls instead of DOS?
 
what you create doesn't matter. Learning the language is about learning the syntax and language features. If you want to learn c# start with C# via CLR. It's a dense book, but has all the information about C# you want (and some you don't :))

I would stay away from drag/drop development as this will not teach you how to use the language. It will teach you how to use the IDE.

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
 
You can download Visual Studio Express Edition from Microsoft for free.

There are some limitations, but for someone new to the language, it's doubtful you'd hit one of them.

Chip H.


____________________________________________________________________
www.chipholland.com
 

I havent written any code since Ashton-Tate Dbaseiii so c# is a hug learning curve... i have messed with Ninja trader script and succeeded a few time ...yaaaay... any way getting an error message I havent found cure to and havent found an explaination I can understand, I'm an old guy (62) and techno talk is babble to me. Jmeckley's explaination to another newbie was ALMOST understandable. Could you help me with this coding problem. Error message much the same..."Cannot assign to set because it is a 'method Group'."

Thanks for your help, BillyBob




namespace NinjaTrader.Indicator
{
/// <summary>
/// Volume*(open-close) compared to prior I think this will show buy sell pressure prior to actual visual change.
/// </summary>
[Description("Volume*(open-close) compared to prior")]
public class VolXOpenClose : Indicator
{
/// <summary>
/// This method is used to configure the indicator and is called once before any bar data is loaded.
/// </summary>
protected override void Initialize()
{
Add(new Plot(Color.Firebrick, PlotStyle.Bar, "RangeValue"));
}

/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
Value.Set=(Volume[0]*(Close[0]-Open[0]))+(Volume[1]*(Close[1]-Open[1]));
}
}
}
 
I havent written any code since Ashton-Tate Dbaseiii so c# is a hug learning curve... i have messed with Ninja trader script and succeeded a few time ...yaaaay... any way getting an error message I havent found cure to and havent found an explaination I can understand, I'm an old guy (62) and techno talk is babble to me. Jmeckley's explaination to another newbie was ALMOST understandable. Could you help me with this coding problem. Error message much the same..."Cannot assign to set because it is a 'method Group'."

Thanks for your help, BillyBob (a Yankee living in Canada)




namespace NinjaTrader.Indicator
{
/// <summary>
/// Volume*(open-close) compared to prior I think this will show buy sell pressure prior to actual visual change.
/// </summary>
[Description("Volume*(open-close) compared to prior")]
public class VolXOpenClose : Indicator
{
/// <summary>
/// This method is used to configure the indicator and is called once before any bar data is loaded.
/// </summary>
protected override void Initialize()
{
Add(new Plot(Color.Firebrick, PlotStyle.Bar, "RangeValue"));
}

/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
Value.Set=(Volume[0]*(Close[0]-Open[0]))+(Volume[1]*(Close[1]-Open[1]));
}
}
}
 
I'm an old guy (62) and techno talk is babble to me.
It's never to late to learn :) Kudo's for taking on a new language.

As for your error message. you are trying to set a value method which is not possible.

properties may have getters and setters
Code:
class Foo
{
   public string Bar {get;set;}
}
(or it may have a private setter/getter in which case it is not available publicly, but I digress).

methods can require arguments and return either void or a value.
Code:
class Foo
{
   private string bar;

   public void SetBar(string s)
   {
       bar = s;
   }

   public string GetBar()
   {
      return bar;
   }
}
To resolve your error you need to
1. find a property setter.
2. find a method which will allow you set the value.
3. change the code to allow you to update the value.

there isn't enough code posted to know which option will work.

Final note (off topic) you should post this as a new thread. attaching to another thread with an unrelated problem is "thread highjacking". This is considered a very rude practice (similar to typing in all caps.)

if you would like to continue this conversation, post a new thread.

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top