Click here to Skip to main content
15,913,587 members
Home / Discussions / C#
   

C#

 
QuestionGenerics class Pin
abedo198226-May-07 9:53
abedo198226-May-07 9:53 
AnswerRe: Generics class Pin
Not Active26-May-07 13:45
mentorNot Active26-May-07 13:45 
GeneralRe: Generics class Pin
abedo198227-May-07 10:49
abedo198227-May-07 10:49 
GeneralRe: Generics class [modified] Pin
Not Active27-May-07 11:45
mentorNot Active27-May-07 11:45 
Questionsynchronization with serialport ? Pin
Mir_As26-May-07 9:22
Mir_As26-May-07 9:22 
AnswerRe: synchronization with serialport ? Pin
Muammar©26-May-07 19:39
Muammar©26-May-07 19:39 
Questionread data from excel Pin
Mujz.........26-May-07 8:59
Mujz.........26-May-07 8:59 
QuestionHow to use code templates for entity properties Pin
AndrusM26-May-07 8:54
AndrusM26-May-07 8:54 
I'm using VCS Express 2005.
I have a lot of property definitions in different classes like

public class MyEntity {
public string somestringfield {
get { return (string)Row["somestringfield"]; }
set { Row["somestringfield"] = value; }
}

public string someotherstringfield {
get { return (string)Row["someotherstringfield"]; }
set { Row["someotherstringfield"] = value; }
}
}

When template changes I must manually change it in hundreds of places.

I tried to use template

#define StringFieldTemplate( propname ) \
public string propname { \
get { return (string)Row[propname]; } }
set { Row[propname] = value; } \
};

public class MyEntity {
StringFieldTemplate("somestringfield2")
StringFieldTemplate("someotherstringfield2")
}

But got error.
How to implement this ?


Andrus

QuestionShow combobox list opening control only in current row Pin
AndrusM26-May-07 8:53
AndrusM26-May-07 8:53 
QuestionDropDownWidth ignored in DataGridViewComboBoxColumn Pin
AndrusM26-May-07 8:51
AndrusM26-May-07 8:51 
Questionhow to tell to regex (regular expression) that ignore some charachters ? Pin
hdv21226-May-07 8:40
hdv21226-May-07 8:40 
AnswerRe: how to tell to regex (regular expression) that ignore some charachters ? Pin
mav.northwind26-May-07 21:59
mav.northwind26-May-07 21:59 
QuestionSetStyle( ) to eliminate flicker causes problem. Pin
Ylno26-May-07 7:56
Ylno26-May-07 7:56 
Questionclearing table or dataGrid and make the table selected fit in my dataGrid Pin
spawn_ro198526-May-07 6:16
spawn_ro198526-May-07 6:16 
QuestionDirectoryInfo Problem Pin
Mohammed Elkholy26-May-07 5:20
Mohammed Elkholy26-May-07 5:20 
AnswerRe: DirectoryInfo Problem Pin
kubben26-May-07 7:14
kubben26-May-07 7:14 
AnswerRe: DirectoryInfo Problem Pin
Luc Pattyn26-May-07 8:28
sitebuilderLuc Pattyn26-May-07 8:28 
Questionexport from grid to excel,word Pin
praveenanand26-May-07 3:18
praveenanand26-May-07 3:18 
AnswerRe: export from grid to excel,word Pin
Manoj Kumar Rai26-May-07 7:02
professionalManoj Kumar Rai26-May-07 7:02 
QuestionOpen File Dialog again Pin
mihksoft26-May-07 3:02
mihksoft26-May-07 3:02 
QuestionHashtable Pin
pranu_1326-May-07 2:55
pranu_1326-May-07 2:55 
AnswerRe: Hashtable Pin
Dave Herren26-May-07 5:00
Dave Herren26-May-07 5:00 
AnswerRe: Hashtable Pin
Kevin McFarlane26-May-07 5:25
Kevin McFarlane26-May-07 5:25 
AnswerRe: Hashtable Pin
Kevin McFarlane26-May-07 5:30
Kevin McFarlane26-May-07 5:30 
QuestionPicture box and drawing Pin
Anka_Ame26-May-07 0:44
Anka_Ame26-May-07 0:44 

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.