Click here to Skip to main content
15,889,853 members
Home / Discussions / C#
   

C#

 
AnswerRe: Deployment Project Error Pin
Mike Dimmick14-Aug-06 16:45
Mike Dimmick14-Aug-06 16:45 
Questionwizard based UI Pin
S Douglas9-Aug-06 17:50
professionalS Douglas9-Aug-06 17:50 
AnswerRe: wizard based UI Pin
Christian Graus9-Aug-06 19:14
protectorChristian Graus9-Aug-06 19:14 
AnswerRe: wizard based UI Pin
Robert Rohde9-Aug-06 20:35
Robert Rohde9-Aug-06 20:35 
Questionwrite into a file Pin
sarojkumarjena9-Aug-06 17:24
sarojkumarjena9-Aug-06 17:24 
AnswerRe: write into a file Pin
Christian Graus9-Aug-06 17:45
protectorChristian Graus9-Aug-06 17:45 
AnswerRe: write into a file [modified] Pin
albCode9-Aug-06 22:42
albCode9-Aug-06 22:42 
QuestionC# .NET 1.1 - MethodBase.Invoke on virtual methods (dynamic method lookup) Pin
Roman Nurik9-Aug-06 14:24
Roman Nurik9-Aug-06 14:24 
Hello all,

I was wondering if there was a way to overcome the "dynamic method lookup" done by MethodBase.Invoke when invoking virtual methods. For example:

public class A
{
	public virtual int Call()
	{
		return 1;
	}
}

public class B : A
{
	public override int Call()
	{
		return 2;
	}
}


... invoking it somewhere else ...

B obj = new B();
MethodInfo method = typeof(A).GetMethod("Call", BindingFlags.Instance | BindingFlags.DeclaredOnly | BindingFlags.Public);
int a = method.Invoke(this, null);


the final value of a would be 2 and not 1.

Anyone know how to get around this?

(P.S. A page on the columbia university website details the default behavior[^] under the 'Remarks' section of Invoke )

Thanks in advance!

r -

AnswerRe: C# .NET 1.1 - MethodBase.Invoke on virtual methods (dynamic method lookup) Pin
S. Senthil Kumar9-Aug-06 20:23
S. Senthil Kumar9-Aug-06 20:23 
GeneralRe: C# .NET 1.1 - MethodBase.Invoke on virtual methods (dynamic method lookup) Pin
Roman Nurik9-Aug-06 20:26
Roman Nurik9-Aug-06 20:26 
GeneralRe: C# .NET 1.1 - MethodBase.Invoke on virtual methods (dynamic method lookup) Pin
Vivek.Sivasamy10-Aug-06 20:38
Vivek.Sivasamy10-Aug-06 20:38 
QuestionRename AD Accounts Pin
neb24usa9-Aug-06 12:03
neb24usa9-Aug-06 12:03 
AnswerRe: Rename AD Accounts Pin
Not Active9-Aug-06 15:02
mentorNot Active9-Aug-06 15:02 
QuestionConverting VB.NET 2.0 Strings.Chr Pin
DocH0liday9-Aug-06 11:29
DocH0liday9-Aug-06 11:29 
AnswerRe: Converting VB.NET 2.0 Strings.Chr Pin
Christian Graus9-Aug-06 11:53
protectorChristian Graus9-Aug-06 11:53 
GeneralRe: Converting VB.NET 2.0 Strings.Chr Pin
DocH0liday9-Aug-06 12:05
DocH0liday9-Aug-06 12:05 
GeneralRe: Converting VB.NET 2.0 Strings.Chr Pin
Christian Graus9-Aug-06 12:15
protectorChristian Graus9-Aug-06 12:15 
GeneralRe: Converting VB.NET 2.0 Strings.Chr Pin
DocH0liday9-Aug-06 12:44
DocH0liday9-Aug-06 12:44 
GeneralRe: Converting VB.NET 2.0 Strings.Chr Pin
Christian Graus9-Aug-06 14:07
protectorChristian Graus9-Aug-06 14:07 
QuestionIndexers Pin
erikkl20009-Aug-06 10:36
erikkl20009-Aug-06 10:36 
AnswerRe: Indexers Pin
Christian Graus9-Aug-06 11:48
protectorChristian Graus9-Aug-06 11:48 
QuestionMAPI and C# Pin
mbnbonin9-Aug-06 9:32
mbnbonin9-Aug-06 9:32 
AnswerRe: MAPI and C# Pin
mav.northwind9-Aug-06 21:05
mav.northwind9-Aug-06 21:05 
GeneralRe: MAPI and C# Pin
mbnbonin10-Aug-06 11:24
mbnbonin10-Aug-06 11:24 
AnswerRe: MAPI and C# Pin
ylhyh26-May-09 20:36
ylhyh26-May-09 20: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.