Click here to Skip to main content
15,891,828 members
Home / Discussions / C#
   

C#

 
AnswerRe: Calculate length of textBox for N number of characters Pin
Rob Philpott23-Feb-09 22:02
Rob Philpott23-Feb-09 22:02 
AnswerRe: Calculate length of textBox for N number of characters Pin
ABitSmart23-Feb-09 22:14
ABitSmart23-Feb-09 22:14 
GeneralRe: Calculate length of textBox for N number of characters Pin
kanchoette23-Feb-09 22:21
kanchoette23-Feb-09 22:21 
QuestionExporting Multiple Sheets in Excel Pin
venkateswaran0223-Feb-09 20:30
venkateswaran0223-Feb-09 20:30 
AnswerRe: Exporting Multiple Sheets in Excel Pin
Greg Chelstowski23-Feb-09 21:34
Greg Chelstowski23-Feb-09 21:34 
QuestionOverloading increment operator [modified] Pin
PIEBALDconsult23-Feb-09 20:27
mvePIEBALDconsult23-Feb-09 20:27 
AnswerRe: Overloading increment operator Pin
DaveyM6923-Feb-09 22:51
professionalDaveyM6923-Feb-09 22:51 
GeneralRe: Overloading increment operator Pin
PIEBALDconsult24-Feb-09 5:11
mvePIEBALDconsult24-Feb-09 5:11 
Your first sentence appears to be on-topic, but I'm not sure of the relevence of the rest. Big Grin | :-D

None of the three C# books I have give guidance on overloading the increment and decrement operators. MSDN doesn't seem to either.
The Microsoft and ECMA specifications merely say it's not like in C++ (as in the quote I posted), and that's no help to me because I only dabbled in C++.

In my case, I expected it to be difficult, but because it is actually simple, it became difficult and confusing to me. "Think our minds must be too highly trained, Majikthise." -- Vroomfondel

MSDN and mainstream books should explain how simple it is rather than expecting the reader to assume it is.

"
When overloading the increment and decrement operators, do not set the value; simply return the new value, the compiler will take care of setting the value and returning the new or old value as appropriate.

return ( x + 1 ) ;     // Correct
return ( x = x + 1 ) ; // Incorrect

"


P.S. I just checked my Rational struct and I see that I have it correct there. D'Oh! | :doh:
GeneralRe: Overloading increment operator Pin
DaveyM6924-Feb-09 12:19
professionalDaveyM6924-Feb-09 12:19 
GeneralRe: Overloading increment operator [modified] Pin
S. Senthil Kumar24-Feb-09 8:08
S. Senthil Kumar24-Feb-09 8:08 
GeneralRe: Overloading increment operator Pin
DaveyM6924-Feb-09 9:51
professionalDaveyM6924-Feb-09 9:51 
AnswerRe: Overloading increment operator Pin
Ennis Ray Lynch, Jr.24-Feb-09 3:29
Ennis Ray Lynch, Jr.24-Feb-09 3:29 
GeneralRe: Overloading increment operator Pin
PIEBALDconsult24-Feb-09 3:55
mvePIEBALDconsult24-Feb-09 3:55 
GeneralRe: Overloading increment operator Pin
Ennis Ray Lynch, Jr.24-Feb-09 3:57
Ennis Ray Lynch, Jr.24-Feb-09 3:57 
Question2d graphs in c# Pin
shefa' isied23-Feb-09 20:02
shefa' isied23-Feb-09 20:02 
AnswerRe: 2d graphs in c# Pin
Megidolaon23-Feb-09 20:16
Megidolaon23-Feb-09 20:16 
AnswerRe: 2d graphs in c# Pin
Nagy Vilmos23-Feb-09 22:55
professionalNagy Vilmos23-Feb-09 22:55 
QuestionHello, please help me cusutomize datagrid or datagridview in C# Pin
anhdn200823-Feb-09 19:52
anhdn200823-Feb-09 19:52 
QuestionType cast Pin
mrithula823-Feb-09 17:58
mrithula823-Feb-09 17:58 
AnswerRe: Type cast Pin
Eslam Afifi23-Feb-09 18:19
Eslam Afifi23-Feb-09 18:19 
GeneralRe: Type cast Pin
mrithula823-Feb-09 18:34
mrithula823-Feb-09 18:34 
AnswerRe: Type cast Pin
Cracked-Down23-Feb-09 18:52
Cracked-Down23-Feb-09 18:52 
GeneralRe: Type cast Pin
mrithula823-Feb-09 19:03
mrithula823-Feb-09 19:03 
AnswerRe: Type cast Pin
Cracked-Down23-Feb-09 19:10
Cracked-Down23-Feb-09 19:10 
GeneralRe: Type cast Pin
mrithula823-Feb-09 20:02
mrithula823-Feb-09 20:02 

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.