Click here to Skip to main content
15,907,183 members
Home / Discussions / C#
   

C#

 
AnswerRe: Leap Motion Integration problem Pin
OriginalGriff19-Nov-15 21:31
mveOriginalGriff19-Nov-15 21:31 
QuestionWriting HtmlHelper to Render all action methods Pin
roxcon18-Nov-15 17:53
roxcon18-Nov-15 17:53 
AnswerRe: Writing HtmlHelper to Render all action methods Pin
Dave Kreskowiak19-Nov-15 2:28
mveDave Kreskowiak19-Nov-15 2:28 
Questionsorting information from several threads - is my algorithm correct? Pin
John Torjo17-Nov-15 12:48
professionalJohn Torjo17-Nov-15 12:48 
AnswerRe: sorting information from several threads - is my algorithm correct? Pin
Matt T Heffron17-Nov-15 13:38
professionalMatt T Heffron17-Nov-15 13:38 
GeneralRe: sorting information from several threads - is my algorithm correct? Pin
John Torjo17-Nov-15 13:42
professionalJohn Torjo17-Nov-15 13:42 
QuestionRe: sorting information from several threads - is my algorithm correct? Pin
Matt T Heffron17-Nov-15 14:00
professionalMatt T Heffron17-Nov-15 14:00 
AnswerRe: sorting information from several threads - is my algorithm correct? Pin
John Torjo17-Nov-15 14:03
professionalJohn Torjo17-Nov-15 14:03 
AnswerRe: sorting information from several threads - is my algorithm correct? Pin
BillWoodruff17-Nov-15 14:49
professionalBillWoodruff17-Nov-15 14:49 
GeneralRe: sorting information from several threads - is my algorithm correct? Pin
John Torjo17-Nov-15 14:59
professionalJohn Torjo17-Nov-15 14:59 
GeneralRe: sorting information from several threads - is my algorithm correct? Pin
BillWoodruff18-Nov-15 0:05
professionalBillWoodruff18-Nov-15 0:05 
GeneralRe: sorting information from several threads - is my algorithm correct? Pin
John Torjo18-Nov-15 0:07
professionalJohn Torjo18-Nov-15 0:07 
GeneralRe: sorting information from several threads - is my algorithm correct? Pin
John Torjo18-Nov-15 10:58
professionalJohn Torjo18-Nov-15 10:58 
AnswerRe: sorting information from several threads - is my algorithm correct? Pin
Gerry Schmitz17-Nov-15 16:13
mveGerry Schmitz17-Nov-15 16:13 
GeneralRe: sorting information from several threads - is my algorithm correct? Pin
John Torjo17-Nov-15 22:12
professionalJohn Torjo17-Nov-15 22:12 
GeneralRe: sorting information from several threads - is my algorithm correct? Pin
Gerry Schmitz18-Nov-15 0:17
mveGerry Schmitz18-Nov-15 0:17 
GeneralRe: sorting information from several threads - is my algorithm correct? Pin
John Torjo18-Nov-15 0:23
professionalJohn Torjo18-Nov-15 0:23 
GeneralRe: sorting information from several threads - is my algorithm correct? Pin
Gerry Schmitz18-Nov-15 0:50
mveGerry Schmitz18-Nov-15 0:50 
GeneralRe: sorting information from several threads - is my algorithm correct? Pin
John Torjo18-Nov-15 4:10
professionalJohn Torjo18-Nov-15 4:10 
AnswerRe: sorting information from several threads - is my algorithm correct? Pin
Daniel Pfeffer18-Nov-15 9:24
professionalDaniel Pfeffer18-Nov-15 9:24 
GeneralRe: sorting information from several threads - is my algorithm correct? Pin
John Torjo18-Nov-15 10:38
professionalJohn Torjo18-Nov-15 10:38 
QuestionNeed help with creating of program Pin
F1nger17-Nov-15 5:01
F1nger17-Nov-15 5:01 
Hi, guy's.
I get some task from teacher so i really need to help.

Task:
Develop and implement functional classes.
Class of points. The base class (three-dimensional point in the plane with integer coordinates).
Methods: calculate the distance between points; adding the coordinates of two points; input - output on the screen; test the convergence of two points.
The original class: the pixels on the screen (points that have color).

Thank's.

That's what i already done:

C#
public  interface ITestPoint
    {
         double PointDistance();
         void OutPoint();
         void SetPoint(double x,double y,double _x,double _y);
    }
    class Point :ITestPoint
    {
        public double x1, x2, y1, y2;

        public double PointDistance()
        {
            return Math.Sqrt(Math.Pow(x2 - x1, 2) + Math.Pow(y2 - y1, 2));
        }
        public void OutPoint()
        {
            Console.WriteLine("Point One({0},{1}); Point Two({2},{3})",x1,y1,x2,y2);
        }
       public void SetPoint(double x,double y,double _x,double _y)
        {
            x1 = x;
            y1 = y;
            x2 = _x;
            y2 = _y;
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
            Point p = new Point();

            p.SetPoint(2,3,5,8);
            p.OutPoint();
            Console.WriteLine(p.PointDistance());
            Console.ReadLine();
        }
    }

AnswerRe: Need help with creating of program Pin
OriginalGriff17-Nov-15 5:12
mveOriginalGriff17-Nov-15 5:12 
GeneralRe: Need help with creating of program Pin
F1nger17-Nov-15 5:16
F1nger17-Nov-15 5:16 
GeneralRe: Need help with creating of program Pin
OriginalGriff17-Nov-15 5:20
mveOriginalGriff17-Nov-15 5:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.