Click here to Skip to main content
15,887,485 members
Home / Discussions / C#
   

C#

 
AnswerRe: RectanlgeF.Parse(string s) extension method? Pin
Luc Pattyn31-May-11 2:42
sitebuilderLuc Pattyn31-May-11 2:42 
AnswerRe: RectanlgeF.Parse(string s) extension method? Pin
Chesnokov Yuriy31-May-11 2:47
professionalChesnokov Yuriy31-May-11 2:47 
AnswerRe: RectanlgeF.Parse(string s) extension method? Pin
Luc Pattyn31-May-11 2:55
sitebuilderLuc Pattyn31-May-11 2:55 
GeneralRe: RectanlgeF.Parse(string s) extension method? Pin
BobJanova31-May-11 3:04
BobJanova31-May-11 3:04 
AnswerRe: RectanlgeF.Parse(string s) extension method? Pin
Luc Pattyn31-May-11 4:00
sitebuilderLuc Pattyn31-May-11 4:00 
GeneralRe: RectanlgeF.Parse(string s) extension method? Pin
BobJanova31-May-11 23:09
BobJanova31-May-11 23:09 
AnswerRe: RectanlgeF.Parse(string s) extension method? Pin
Luc Pattyn1-Jun-11 0:17
sitebuilderLuc Pattyn1-Jun-11 0:17 
AnswerRe: RectanlgeF.Parse(string s) extension method? Pin
Shameel31-May-11 3:05
professionalShameel31-May-11 3:05 
Although we declare extension methods to be static, they actually work on instances (note that we specify the 'this' keyword in the first parameter). I would love to have the feature you're asking for, so we can use Rectangle.Parse(str). In your case, the neater alternative is to create a static Parser class and have a ToRectangeF method like this:

C#
static class Parser {
    static RectangeF ToRectangeF(string s) {
        ....
    }
}

GeneralRe: RectanlgeF.Parse(string s) extension method? Pin
Pete O'Hanlon31-May-11 3:39
mvePete O'Hanlon31-May-11 3:39 
QuestionClicking a button with SendMessage [modified] Pin
musefan30-May-11 23:36
musefan30-May-11 23:36 
AnswerRe: Clicking a button with SendMessage Pin
Shameel31-May-11 0:15
professionalShameel31-May-11 0:15 
GeneralRe: Clicking a button with SendMessage Pin
musefan31-May-11 0:42
musefan31-May-11 0:42 
GeneralRe: Clicking a button with SendMessage Pin
Shameel31-May-11 0:55
professionalShameel31-May-11 0:55 
GeneralRe: Clicking a button with SendMessage Pin
Shameel31-May-11 0:58
professionalShameel31-May-11 0:58 
GeneralRe: Clicking a button with SendMessage Pin
musefan31-May-11 2:22
musefan31-May-11 2:22 
AnswerRe: Clicking a button with SendMessage Pin
Pete O'Hanlon31-May-11 2:43
mvePete O'Hanlon31-May-11 2:43 
GeneralRe: Clicking a button with SendMessage Pin
musefan31-May-11 5:59
musefan31-May-11 5:59 
AnswerRe: Clicking a button with SendMessage Pin
_Erik_1-Jun-11 4:20
_Erik_1-Jun-11 4:20 
QuestionRectangleF to and back from string? Pin
Chesnokov Yuriy30-May-11 22:49
professionalChesnokov Yuriy30-May-11 22:49 
AnswerRe: RectangleF to and back from string? Pin
Richard MacCutchan30-May-11 23:30
mveRichard MacCutchan30-May-11 23:30 
AnswerRe: RectangleF to and back from string? Pin
Pete O'Hanlon31-May-11 0:32
mvePete O'Hanlon31-May-11 0:32 
QuestionRe: RectangleF to and back from string? Pin
Chesnokov Yuriy31-May-11 0:45
professionalChesnokov Yuriy31-May-11 0:45 
AnswerRe: RectangleF to and back from string? Pin
Pete O'Hanlon31-May-11 1:27
mvePete O'Hanlon31-May-11 1:27 
AnswerRe: RectangleF to and back from string? Pin
Chesnokov Yuriy31-May-11 1:54
professionalChesnokov Yuriy31-May-11 1:54 
GeneralRe: RectangleF to and back from string? Pin
Pete O'Hanlon31-May-11 2:36
mvePete O'Hanlon31-May-11 2:36 

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.