Wow, C# 2.0 (Visual Studio 2005) does not support Polyline

  • Thread starter Thread starter raylopez99
  • Start date Start date
R

raylopez99

This language C# is more primitive than I thought. I just found out
that C#2.0 does not support polyline (see below), a very useful
feature for connecting points with a line automatically. Only C# 3.0
supports this. I'm curious, what did people do before version 3.0 was
released? I guess they had to construct their own functions that
manually connected the points? Unreal.

I think C# .Forms is beta compared to MFC and C++, but unfortunately
there's no going back...

RL

/*
// Add the Polyline Element //needs VS 2008 / C# 3.0 framework!
myPolyline = new Polyline();
myPolyline.Stroke = Brushes.SlateGray;
myPolyline.StrokeThickness = 2;
myPolyline.FillRule = FillRule.EvenOdd;
Point Point4 = new Point(1, 50);
Point Point5 = new Point(10, 80);
Point Point6 = new Point(20, 40);
PointCollection myPointCollection2 = new PointCollection();
myPointCollection2.Add(Point4);
myPointCollection2.Add(Point5);
myPointCollection2.Add(Point6);

*/
 
raylopez99 said:
This language C# is more primitive than I thought. I just found out
that C#2.0 does not support polyline (see below), a very useful
feature for connecting points with a line automatically. Only C# 3.0
supports this.

No, C# 3.0 doesn't support it at all. It's not a *language* construct.
Yes, Polyline is part of WPF which is part of .NET 3.0.

In Windows Forms, I suspect that GraphicsPath is what you're after. But
that's not part of C# (which is a language) either.
 
In Windows Forms, I suspect that GraphicsPath is what you're after. But
that's not part of C# (which is a language) either.

GraphicsPath is indeed what I'm seeking, and it's part of Namespace:
System.Drawing.Drawing2D, which exists in my library, so I don't see
why you say it's not part of C# (which is not a ANSI type standard,
but owned by MSFT) unlike Polyline, which is part of
System.Windows.Shapes;, which would not load into my C# library
(Intellisense did not detect it).

I upgraded to C# 3.0 just now (Express, free edition) 'for nothing',
but I like the interface a bit better than C#2.0 so it might not be
for nought.

Thanks for your help.

RL
 
On Jul 28, 9:25 am, raylopez99 <[email protected]> wrote:
If you don't like Windows Forms in C#, then watch this video and see
how you can use WPF to create a pretty cool interface:

http://www.dnrtv.com/default.aspx?showNum=115

Silverlight only allowed me to listen to the guys voice, from
Nashville--I like his Southern accent, what a hoot--but video would
not come up. Anyway for me Forms is OK, so long as I have people on
this forum to guide me when I get stuck in the occasional dead
end...sure beats having to use the MSDN documentation, which with so
many OOP programming language versions is confusing (witness this
thread, for sure I thought Polyline was part of C# 3.0, or at least
that was the impression I got from reading the documentation--
apparently it's used for some server side ASP type programming with
C#.

RL
 
raylopez99 said:
GraphicsPath is indeed what I'm seeking, and it's part of Namespace:
System.Drawing.Drawing2D, which exists in my library, so I don't see
why you say it's not part of C# (which is not a ANSI type standard,
but owned by MSFT) unlike Polyline, which is part of
System.Windows.Shapes;, which would not load into my C# library
(Intellisense did not detect it).

C# is a language. It doesn't define the libraries that come with it
beyond a few required types (IEnumerable, IDisposable etc). It's
helpful to distinguish between the language, the CLR (the runtime
"engine" if you will) and the libraries.
 
why you say it's not part of C# (which is not a ANSI type standard,
but owned by MSFT)

C# (1 and 2) is actually standardized by Ecma and ISO:

http://www.ecma-international.org/publications/standards/Ecma-334.htm
http://www.iso.org/iso/iso_catalogue/catalogue_ics/catalogue_detail_ics.htm?csnumber=42926

C# 3 is likely to follow suit eventually.

Nonetheless, the contents of the System namespace and its
subnamespaces is not regulated by the C# language specification, apart
from a few foundational types that are required in any environment
able to be targeted by a C# compiler - stuff like System.Object,
System.String, System.Int32, System.Attribute etc. It does not cover
collections, IO, XML processing, UI frameworks etc; as such, those are
not part of the C# language.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top