Click here to Skip to main content
15,886,873 members
Home / Discussions / C#
   

C#

 
GeneralRe: Memory Stream Pin
Kushina8-Nov-12 7:05
Kushina8-Nov-12 7:05 
GeneralRe: Memory Stream Pin
jschell8-Nov-12 8:43
jschell8-Nov-12 8:43 
GeneralRe: Memory Stream Pin
Kushina9-Nov-12 9:58
Kushina9-Nov-12 9:58 
QuestionTotal hack - but is it OK? Pin
harold aptroot8-Nov-12 4:58
harold aptroot8-Nov-12 4:58 
AnswerRe: Total hack - but is it OK? Pin
Dave Kreskowiak8-Nov-12 6:37
mveDave Kreskowiak8-Nov-12 6:37 
AnswerRe: Total hack - but is it OK? Pin
SledgeHammer018-Nov-12 6:43
SledgeHammer018-Nov-12 6:43 
GeneralRe: Total hack - but is it OK? Pin
BobJanova8-Nov-12 23:18
BobJanova8-Nov-12 23:18 
AnswerRe: Total hack - but is it OK? Pin
Eddy Vluggen8-Nov-12 8:47
professionalEddy Vluggen8-Nov-12 8:47 
harold aptroot wrote:
This is a total hack, obviously. But is it OK? Assuming it isn't given bad indexes, can it fail somehow?

Not much exceptions that are thrown by those functions, according to MSDN. You might want to check whether the topic 'verification' from this page[^] applies to your situation.

No, wouldn't call it a hack, but emitting code is not a widely-understood topic; so you might wanna document what you did there. An implementation that 'generates' the required switch-code and compiling that with the built-in mechanism would be more familiar - also a bit slower, but I doubt that the layout of the class will change often, so it'd be a matter of compiling once and re-using the existing thing.

I'd go for reflection, as mentioned by others. Caching the results might improve speed there, but it's fast enough for most tasks without additional caching.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]
They hate us for our freedom![^]

GeneralRe: Total hack - but is it OK? Pin
harold aptroot8-Nov-12 9:05
harold aptroot8-Nov-12 9:05 
GeneralRe: Total hack - but is it OK? Pin
Eddy Vluggen8-Nov-12 9:24
professionalEddy Vluggen8-Nov-12 9:24 
GeneralRe: Total hack - but is it OK? Pin
harold aptroot8-Nov-12 9:43
harold aptroot8-Nov-12 9:43 
GeneralRe: Total hack - but is it OK? Pin
Eddy Vluggen8-Nov-12 10:13
professionalEddy Vluggen8-Nov-12 10:13 
AnswerDepends on your goal Pin
Ennis Ray Lynch, Jr.9-Nov-12 7:26
Ennis Ray Lynch, Jr.9-Nov-12 7:26 
QuestionHow to get outlook mails using add-ins Pin
Sanjeev99187-Nov-12 23:10
Sanjeev99187-Nov-12 23:10 
AnswerRe: How to get outlook mails using add-ins Pin
Dave Kreskowiak8-Nov-12 1:36
mveDave Kreskowiak8-Nov-12 1:36 
GeneralRe: How to get outlook mails using add-ins Pin
OriginalGriff8-Nov-12 4:15
mveOriginalGriff8-Nov-12 4:15 
GeneralRe: How to get outlook mails using add-ins Pin
Sanjeev99188-Nov-12 23:31
Sanjeev99188-Nov-12 23:31 
GeneralRe: How to get outlook mails using add-ins Pin
Dave Kreskowiak9-Nov-12 1:49
mveDave Kreskowiak9-Nov-12 1:49 
QuestionConverting a stream of html to xml and reading the xml into a xmldocumet in c# Pin
Steve Holdorf7-Nov-12 23:05
Steve Holdorf7-Nov-12 23:05 
AnswerRe: Converting a stream of html to xml and reading the xml into a xmldocumet in c# Pin
Deflinek7-Nov-12 23:20
Deflinek7-Nov-12 23:20 
GeneralRe: Converting a stream of html to xml and reading the xml into a xmldocumet in c# Pin
Steve Holdorf8-Nov-12 2:40
Steve Holdorf8-Nov-12 2:40 
AnswerRe: Converting a stream of html to xml and reading the xml into a xmldocumet in c# Pin
Richard Deeming8-Nov-12 2:16
mveRichard Deeming8-Nov-12 2:16 
GeneralRe: Converting a stream of html to xml and reading the xml into a xmldocumet in c# Pin
Steve Holdorf10-Nov-12 1:07
Steve Holdorf10-Nov-12 1:07 
GeneralRe: Converting a stream of html to xml and reading the xml into a xmldocumet in c# Pin
Richard Deeming12-Nov-12 1:58
mveRichard Deeming12-Nov-12 1:58 
QuestionVSTO Outlook Visual C# - Create a ribbon that load a windows form integrated into outlook form? Pin
Cristian Capannini7-Nov-12 22:31
Cristian Capannini7-Nov-12 22:31 

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.