Click here to Skip to main content
12,079,091 members (48,416 online)
   

C#

 
AnswerRe: Time Subtract Pin
Pete O'Hanlon10-May-11 21:59
mvpPete O'Hanlon10-May-11 21:59 
AnswerRe: Time Subtract Pin
Luc Pattyn11-May-11 1:31
mvpLuc Pattyn11-May-11 1:31 
AnswerRe: Time Subtract Pin
dasblinkenlight11-May-11 5:33
memberdasblinkenlight11-May-11 5:33 
AnswerRe: Time Subtract Pin
jschell11-May-11 9:33
memberjschell11-May-11 9:33 
QuestionProperty Pin
messages10-May-11 20:25
membermessages10-May-11 20:25 
AnswerRe: Property PinPopular
Pete O'Hanlon10-May-11 21:39
mvpPete O'Hanlon10-May-11 21:39 
AnswerRe: Property Pin
Luc Pattyn11-May-11 1:34
mvpLuc Pattyn11-May-11 1:34 
AnswerRe: Property Pin
rushijoshi11-May-11 3:29
memberrushijoshi11-May-11 3:29 
Second way is property declaration in C# 3.0, for C# 2.0 you have to strict with first implementation.

If you want to do some validation in (get) and (set) then second way should not work. Like, on saving (set) a value you would like to check then you have to write validation code in set block.

private int m_number;
 
public int My_NUM
{
get{ return m_number;}
set{
   if (value > 0)
       m_number=value;
   }
} 

Regards
Rushi
AnswerRe: Property Pin
Amarnath S12-May-11 18:55
groupAmarnath S12-May-11 18:55 
QuestionChanging values in DataTable.. [modified] Pin
pradeep45510-May-11 20:20
memberpradeep45510-May-11 20:20 
AnswerRe: Changing values in DataTable.. Pin
d@nish 10-May-11 20:22
member d@nish 10-May-11 20:22 
AnswerRe: Changing values in DataTable.. Pin
Hiren Solanki10-May-11 22:07
memberHiren Solanki10-May-11 22:07 
AnswerRe: Changing values in DataTable.. Pin
Luc Pattyn11-May-11 1:44
mvpLuc Pattyn11-May-11 1:44 
QuestionMSTest Pin
Subin Mavunkal10-May-11 20:14
memberSubin Mavunkal10-May-11 20:14 
AnswerRe: MSTest Pin
d@nish 10-May-11 20:20
member d@nish 10-May-11 20:20 
GeneralRe: MSTest Pin
Subin Mavunkal10-May-11 20:25
memberSubin Mavunkal10-May-11 20:25 
GeneralRe: MSTest Pin
d@nish 10-May-11 22:48
member d@nish 10-May-11 22:48 
AnswerRe: MSTest Pin
Dalek Dave18-May-11 13:17
mvpDalek Dave18-May-11 13:17 
QuestionAdding service to c# windows application Pin
sarang_k10-May-11 20:12
membersarang_k10-May-11 20:12 
AnswerRe: Adding service to c# windows application Pin
d@nish 10-May-11 20:20
member d@nish 10-May-11 20:20 
GeneralRe: Adding service to c# windows application Pin
sarang_k10-May-11 20:22
membersarang_k10-May-11 20:22 
GeneralRe: Adding service to c# windows application Pin
d@nish 10-May-11 22:54
member d@nish 10-May-11 22:54 
GeneralRe: Adding service to c# windows application Pin
rushijoshi11-May-11 4:17
memberrushijoshi11-May-11 4:17 
QuestionDataGridView Sorting in windows Pin
pradeep45510-May-11 18:03
memberpradeep45510-May-11 18:03 
AnswerRe: DataGridView Sorting in windows [modified] Pin
Luc Pattyn10-May-11 18:11
mvpLuc Pattyn10-May-11 18:11 

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.


Advertise | Privacy | Mobile
Web04 | 2.8.160212.1 | Last Updated 14 Feb 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid