Click here to Skip to main content
15,746,201 members
Home / Discussions / C#
   

C#

 
GeneralRe: Time Calculation Pin
0x3c031-May-09 1:33
0x3c031-May-09 1:33 
GeneralRe: Time Calculation [modified] Pin
Alan N31-May-09 3:23
Alan N31-May-09 3:23 
GeneralRe: Time Calculation Pin
mrcooll31-May-09 1:53
mrcooll31-May-09 1:53 
AnswerRe: Time Calculation Pin
0x3c031-May-09 1:17
0x3c031-May-09 1:17 
Questionvideo file from web service Pin
Faysal30-May-09 22:06
Faysal30-May-09 22:06 
QuestionOverride non virtual Methods Pin
hafi8030-May-09 21:18
hafi8030-May-09 21:18 
AnswerRe: Override non virtual Methods Pin
Nuri Ismail30-May-09 22:28
Nuri Ismail30-May-09 22:28 
AnswerRe: Override non virtual Methods Pin
S. Senthil Kumar31-May-09 7:45
S. Senthil Kumar31-May-09 7:45 
No, I don't know of any way to do that at runtime. Most mocking frameworks require methods to be virtual (DynamicProxy[^]..).

TypeMock[^] somehow manages to do that for non-virtual methods, but is unfortunately closed source.

Have you thought about doing this with compile time flags and the "using" declarative? Something like
#if DEBUG
using MyType = Project.MockTypes.MockType
#else
using MyType = Project.RealTypes.RealType
#endif


Regards
Senthil [MVP - Visual C#]
_____________________________
My Home Page |My Blog | My Articles | My Flickr | WinMacro

AnswerRe: Override non virtual Methods Pin
PIEBALDconsult31-May-09 15:49
professionalPIEBALDconsult31-May-09 15:49 
QuestionFullText Search Pin
ellllllllie30-May-09 19:14
ellllllllie30-May-09 19:14 
AnswerRe: FullText Search Pin
I Believe In GOD31-May-09 2:01
I Believe In GOD31-May-09 2:01 
QuestionForms, Transparencykey and Windows VISTA Pin
franco nero30-May-09 18:39
franco nero30-May-09 18:39 
AnswerRe: Forms, Transparencykey and Windows VISTA Pin
franco nero30-May-09 20:00
franco nero30-May-09 20:00 
QuestionWeb service Pin
chotuithamgia30-May-09 18:13
chotuithamgia30-May-09 18:13 
AnswerRe: Web service Pin
Dave Kreskowiak30-May-09 18:42
mveDave Kreskowiak30-May-09 18:42 
JokeRe: Web service Pin
Manas Bhardwaj30-May-09 20:13
professionalManas Bhardwaj30-May-09 20:13 
QuestionOne apps causes another app to crash.. [modified] Pin
Jonathan Tripathy30-May-09 11:28
Jonathan Tripathy30-May-09 11:28 
AnswerRe: One apps causes another app to crash.. Pin
Luc Pattyn30-May-09 15:22
sitebuilderLuc Pattyn30-May-09 15:22 
GeneralRe: One apps causes another app to crash.. Pin
Jonathan Tripathy30-May-09 23:32
Jonathan Tripathy30-May-09 23:32 
QuestionVehicle Lane Tracking Algorithm Pin
sebogawa30-May-09 9:44
sebogawa30-May-09 9:44 
AnswerRe: Vehicle Lane Tracking Algorithm Pin
Uffe Rask30-May-09 10:52
Uffe Rask30-May-09 10:52 
AnswerRe: Vehicle Lane Tracking Algorithm Pin
Henry Minute30-May-09 11:01
Henry Minute30-May-09 11:01 
QuestionRe: Vehicle Lane Tracking Algorithm Pin
sebogawa30-May-09 11:11
sebogawa30-May-09 11:11 
AnswerRe: Vehicle Lane Tracking Algorithm Pin
Henry Minute30-May-09 11:28
Henry Minute30-May-09 11:28 
GeneralRe: Vehicle Lane Tracking Algorithm Pin
sebogawa30-May-09 11:33
sebogawa30-May-09 11:33 

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.