Click here to Skip to main content
15,896,154 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to make a program like Paint with C# Pin
MohammedMahmoud25-Apr-09 8:04
MohammedMahmoud25-Apr-09 8:04 
GeneralRe: How to make a program like Paint with C# Pin
Luc Pattyn25-Apr-09 8:21
sitebuilderLuc Pattyn25-Apr-09 8:21 
GeneralRe: How to make a program like Paint with C# Pin
MohammedMahmoud25-Apr-09 8:33
MohammedMahmoud25-Apr-09 8:33 
GeneralRe: How to make a program like Paint with C# Pin
Luc Pattyn25-Apr-09 8:48
sitebuilderLuc Pattyn25-Apr-09 8:48 
GeneralRe: How to make a program like Paint with C# Pin
MohammedMahmoud25-Apr-09 8:54
MohammedMahmoud25-Apr-09 8:54 
GeneralRe: How to make a program like Paint with C# Pin
fly90425-Apr-09 9:15
fly90425-Apr-09 9:15 
GeneralRe: How to make a program like Paint with C# Pin
Christian Graus25-Apr-09 11:30
protectorChristian Graus25-Apr-09 11:30 
QuestionProperties error in C# Pin
gopinathtamil25-Apr-09 5:39
gopinathtamil25-Apr-09 5:39 
i have tried using below coding for shopping cart functionality...but it shows below error...

Error:

CS0501: 'CartItem.Quantity.get' must declare a body because it is not marked abstract or extern

Coding
using System;

public class CartItem : IEquatable<cartitem> {
	#region Properties

    public int Quantity
    {
        get;
        set;
    }

	private int _productId;

	public int ProductId 
    {
		get 
        { 
            return _productId; 
        }
		set 
        {
			_productId = value;
		}
	}

	private Product _product = null;  

	public Product Prod 
    {
		get 
        {
			if (_product == null) 
            {
				_product = new Product(ProductId);
			}
			return _product;
		}
	}

	public string Description 
    {
		get 
        { 
            return Prod.Description; 
        }
	}

	public decimal UnitPrice 
    {
		get 
        { 
            return Prod.Price; 
        }
	}
    public string productname
    {
        get
        {
            return Prod.Productname;  
        }
    }

	public decimal TotalPrice 
    {
		get 
        { 
            return UnitPrice * Quantity; 
        }
	}

	#endregion

	public CartItem(int productId) 
    {
		this.ProductId = productId;
	}

	public bool Equals(CartItem item) 
    {
		return item.ProductId == this.ProductId;
	}
}

</cartitem>

AnswerRe: Properties error in C# Pin
Luc Pattyn25-Apr-09 5:48
sitebuilderLuc Pattyn25-Apr-09 5:48 
Questionwpf listview row click Pin
netDeveloper25-Apr-09 5:06
netDeveloper25-Apr-09 5:06 
AnswerRe: wpf listview row click Pin
netDeveloper25-Apr-09 6:31
netDeveloper25-Apr-09 6:31 
Questionweb apllication quiz Pin
rudykaka25-Apr-09 4:41
rudykaka25-Apr-09 4:41 
AnswerRe: Web Application Quiz Pin
fly90425-Apr-09 4:56
fly90425-Apr-09 4:56 
GeneralRe: Web Application Quiz Pin
rudykaka26-Apr-09 3:33
rudykaka26-Apr-09 3:33 
GeneralRe: Web Application Quiz Pin
fly90426-Apr-09 3:47
fly90426-Apr-09 3:47 
GeneralRe: Web Application Quiz Pin
rudykaka27-Apr-09 5:59
rudykaka27-Apr-09 5:59 
GeneralRe: Web Application Quiz Pin
fly90427-Apr-09 6:25
fly90427-Apr-09 6:25 
GeneralRe: Web Application Quiz Pin
rudykaka27-Apr-09 11:00
rudykaka27-Apr-09 11:00 
AnswerRe: web apllication quiz Pin
ali_reza_zareian25-Apr-09 5:02
ali_reza_zareian25-Apr-09 5:02 
QuestionWindows Explorer Addins using C# [modified] Pin
satsumatable25-Apr-09 3:57
satsumatable25-Apr-09 3:57 
AnswerRe: Windows Explorer Addins using C# Pin
vaghelabhavesh25-Apr-09 7:30
vaghelabhavesh25-Apr-09 7:30 
Questionvista and xp Pin
Try25-Apr-09 3:19
Try25-Apr-09 3:19 
AnswerRe: vista and xp Pin
0x3c025-Apr-09 3:38
0x3c025-Apr-09 3:38 
Question[Message Deleted] Pin
hkjghkj125-Apr-09 1:50
hkjghkj125-Apr-09 1:50 
AnswerRe: char in string Pin
Luc Pattyn25-Apr-09 2:12
sitebuilderLuc Pattyn25-Apr-09 2:12 

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.