Saturday, July 26, 2014

C++ Tutorial for Beginners 31 - Operator Overloading in C++









1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <iostream>
#include<string>
using namespace std;
class Vector {
  public:
    int x,y;
    Vector () {};
    Vector (int a,int b)
    {
        x=a;
        y=b;
    }
    Vector operator+(const Vector&);
};
Vector Vector::operator+(const Vector& parameter){
     Vector temp;
     temp.x=x+ parameter.x;
     temp.y=y+ parameter.y;
     return temp;
}
int main()
{
    Vector vec1(4,2);
    Vector vec2(2,2);
    Vector result;
    result=vec1+vec2;

    cout<<"the result is ("<<result.x<<","<<result.y<<")"<<endl;
    int x=2,y=3;
    int z=x+y;
    return 0;
}




















-------------------------------------------------------------------

Verwandte Suchanfragen zu operator overloading in c++

overloading ostream operator c++

c++ cast operator overloading

overloading assignment operator c++

overloading increment operator c++

c++ operator overloading wiki

c++ virtual operator overloading

c++ operator overloading example

C++ Operator Overloading Guidelines

C++ Overloading (Operator and Function)

C++ Operator Overloading

C++ Overloading and Operator Overloading

Searches related to c++ tutorials



c++ tutorials pdf



c++ examples



c++ video tutorials



dev c++ tutorials



visual c++ tutorials for beginners



advanced c++ tutorials



visual c++ tutorials

c++ tutorials youtube

C++ Programming/Operators/Operator Overloading

c++ operator+=

Saturday, July 12, 2014

C# MS Access Database Tutorial 1 # Getting Started and Access database C...









1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
namespace AccessLoginApp
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            try
            {
                OleDbConnection connection = new OleDbConnection();
                connection.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\dwishika\Documents\Access Database\EmployeeInfo.accdb;
Persist Security Info=False;";
                connection.Open();
                checkConnection.Text = "Connection Successful";
                connection.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error  "+ ex);
            }
        }
    }
}












_____________________________________________

C# Windows Form Application MS Access Connection

c# - How can I connect to MS Accessfrom windows forms?

Using Visual C# Windows Forms with MS Access

C# Programming for beginners: How to connect MS

Verwandte Suchanfragen zu C# MS Access Database Tutorial

ms access database tutorial pdf

microsoft access database tutorial

c# ms access database connection

c# ms access database example

how to connect ms access database in c#

AccessDatabase

Windows Form Application using MS AccessServer

Connect MS Accessfrom C# Windows Forms

MS Accessproblem to connect with windows form c#

C# Windows Form Application MS AccessConnection

MS Access And Visual C# 2010 Windows Form Application

MS Access:: Connecting to MS Accesswith a Windows Form application

C# Form textbox string into SQL Database

visual c# CLR windows form application and mysql

assembly reference not working in C# script

Trying to connect to MySQL from C# application

mysql and C# window form application

How to connect MS Accessusing C#?‎

Tuesday, July 8, 2014

C# Tutorial for Beginners 22 - Properties in C# (How to Define Properti...









1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
using System;
namespace MyProject.Examples
{
    public class Book
    {
        private int _id;
        private string _bookName;
        private int _noOfPAges=250;
        private string _auther;

  
        public string Auther{get; set;}
            

        public int Id
        {
            set
            {
                if (value < 0)
                    throw new Exception("Id not valid");
                this._id = value;
            }
            get {
                return this._id;
            }
        }
  


        public string BookName
        {
            set
            {
                if (string.IsNullOrEmpty(value))
                    throw new Exception("Book Name not valid or null");
                this._bookName = value;
            }
            get {
                return this._bookName;
            }
        }


        public int NoOfPAge
        {
            get
            {
                return this._noOfPAges;
            }
        }
    }
 

    class ExampleOne
    {
        public static void Main()
        {
         
            Book B1 =new Book();
            B1.Id=10;
            B1.BookName = "The C# Book";
            B1.Auther = "ProgrammingKnowldge";
            Console.WriteLine("The Book Id is {0}", B1.Id);
            Console.WriteLine("The Book Name is {0}", B1.BookName);
            Console.WriteLine("The Book Page is {0}", B1.NoOfPAge);
            Console.WriteLine("The Book Auther is {0}", B1.Auther);
            Console.ReadKey();
        }
    }
}














---------------------------------------------------------------------

earches related to properties c#

extension properties c#

use properties c#

writing properties in c#

override properties c#

private properties c#

class properties c#

properties.settings c#

constructor c#

Searches related to property c#

automatic property c#

virtual property c#

nonserialized property c#

property c# interface

property c# default value

override property c#

private set property c#

private property c#

Using Properties (C# Programming Guide)

Monday, July 7, 2014

C# Tutorial for Beginners 20 - Difference between Method Overriding and ...









1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
namespace MyProject.Examples
{
    public class Drawing
    {
        public virtual void Draw()
        {
            Console.WriteLine("This is just a generic drawing class");
        }
    }
    public class line : Drawing
    {
        public override void Draw()
        {
            Console.WriteLine("This is a Line");
        }

       /* public new void Draw()
        {
            Console.WriteLine("This is a Line");
        }*/
    }

    class ExampleOne
    {
        public static void Main()
        {
            Drawing obj = new line();

            Console.ReadKey();
        }
    }
}














-----------------------------------------------------------

Searches related to difference between method hiding and method overriding C#

difference between method overriding and method hiding in java

difference between method overloading and method overriding in c# net

difference between method overloading and method overriding in c#

method overriding vs method hiding in c#

C# Tutorial for Beginners 19 - Polymorphism in C#









1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using System;
namespace MyProject.Examples
{
    public class Drawing
    {
        public virtual void Draw()
        {
            Console.WriteLine("This is just a generic drawing object.");
        }
    }
    public class Line : Drawing
    {
        public override void Draw()
        {
            Console.WriteLine("This is a Line.");
        }
    }
    public class Circle : Drawing
    {
        public override void Draw()
        {
            Console.WriteLine("This is a Circle.");
        }
    }
    public class Square : Drawing
    {
        public override void Draw()
        {
            Console.WriteLine("This is a Square.");
        }
    }


    class ExampleOne
    {
        public static void Main()
        {
            Drawing[] dObj = new Drawing[4];
            dObj[0] = new Line();
            dObj[1] = new Circle();
            dObj[2] = new Square();
            dObj[3] = new Drawing();

            foreach (Drawing draw in dObj)
            {
                draw.Draw();
            }
            Console.ReadKey();
        }
    }
}
























--------------------------------------------------------------

Searches related to polymorphism C#

encapsulation c#

polymorphism c# definition

polymorphism c# interview questions

runtime polymorphism c#

inheritance polymorphism c#

Introduction to inheritance, polymorphism in C#

c# - Is this the example of polymorphism?

what's the difference between inheritance and polymorphism?

C# - Types of Polymorphism in C#.Net

static polymorphism c#

polymorphism c# tutorial

polymorphism c#

Thursday, July 3, 2014

C# Tutorial for Beginners 18 - Method Hiding in C#











1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
namespace MyProject.Examples
{
    class FC
    {
        public void Display()
        {
            System.Console.WriteLine("FC::Display");
        }
    }
    class SC : FC
    {
        public new void Display()
        {
            //base.Display();
            System.Console.WriteLine("SC::Display");
        }
    }
    class TC : SC
    {
        public new void Display()
        {
            //base.Display();
            System.Console.WriteLine("TC::Display");
        }
    }
    class ExampleOne
    {
        public static void Main()
        {
            TC obj = new TC();
           // SC obj = new FC();
           // ((FC)obj).Display();
            obj.Display();

           
            Console.ReadKey();
        }
    }
}




















--------------------------------------------------------

Searches related to method hiding c#

method hiding overriding

method hiding bc

tutorial on method hiding c#

method hiding and overriding in c#

difference between method overriding and method hiding in c#

method overriding in c#

method overriding in c# with example

method overriding in c#.net with example

Hiding through inheritance (C#)

Method Overriding and Method Hiding in C#

Difference between method overriding

Method Hiding in C#

Method hiding in C#

Concept Overide vs Method Hiding in terms of C#

Hiding a base method vs Overriding a virtual method

C# Inheritance and Member Hiding

C# Tutorial for Beginners 17 - Class Inheritance in C#









1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
namespace MyProject.Examples
{
    class Polygon {
        public Polygon()
        {
            Console.WriteLine("We are in Base class");
        }
        public int width, height;
        public void setVlues(int a, int b)
        {
            this.width=a;
            this.height=b;
        }
    }

    class Rectangle : Polygon
    {
        public Rectangle()
        {
            Console.WriteLine("We are in Derived Rectaange class");
        }
        public int area() {
            return width * height;
        }
    }
    class Triangle : Polygon
    {
        public int area()
        {
            return width * height/2;
        }
    }
    class ExampleOne
    {
        public static void Main()
        {
            Rectangle rect = new Rectangle();
            Triangle trig = new Triangle();
            rect.setVlues(10,20);
            trig.setVlues(30,20);

            Console.WriteLine("Rectangle area = {0}", rect.area());
            Console.WriteLine("Triangle area = {0}", trig.area());
            Console.ReadKey();
        }
    }
}




































------------------------------------------------------

Searches related to c# inheritance

c# inheritance constructor

c# multiple inheritance

c# polymorphism

c# inheritance multiple classes

c# inheritance syntax

C# Programming/Inheritance

C# Inheritance Example

Inheritance C# Programming

c# inheritance interface

c# inheritance vs interface

c# inheritance types
IT Certification Category (English)640x480

Partner Sites

VideoToGifs.com

EasyOnlineConverter.com

SqliteTutorials.com


Top Online Courses From ProgrammingKnowledge

Python Course http://bit.ly/2vsuMaS
Java Coursehttp://bit.ly/2GEfQMf
Bash Coursehttp://bit.ly/2DBVF0C
Linux Coursehttp://bit.ly/2IXuil0
C Course http://bit.ly/2GQCiD1
C++ Coursehttp://bit.ly/2V4oEVJ
PHP Coursehttp://bit.ly/2XP71WH
Android Coursehttp://bit.ly/2UHih5H
C# Coursehttp://bit.ly/2Vr7HEl
JavaFx Coursehttp://bit.ly/2XMvZWA
NodeJs Coursehttp://bit.ly/2GPg7gA
Jenkins Course http://bit.ly/2Wd4l4W
Scala Coursehttp://bit.ly/2PysyA4
Bootstrap Coursehttp://bit.ly/2DFQ2yC
MongoDB Coursehttp://bit.ly/2LaCJfP
QT C++ GUI Coursehttp://bit.ly/2vwqHSZ