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

C#

 
AnswerRe: No private virtual methods? Pin
Heath Stewart13-Feb-04 12:08
protectorHeath Stewart13-Feb-04 12:08 
GeneralRe: No private virtual methods? Pin
Nemanja Trifunovic13-Feb-04 12:37
Nemanja Trifunovic13-Feb-04 12:37 
GeneralRe: No private virtual methods? Pin
Heath Stewart13-Feb-04 12:41
protectorHeath Stewart13-Feb-04 12:41 
GeneralRe: No private virtual methods? Pin
Nemanja Trifunovic13-Feb-04 12:50
Nemanja Trifunovic13-Feb-04 12:50 
GeneralRe: No private virtual methods? Pin
Heath Stewart13-Feb-04 13:00
protectorHeath Stewart13-Feb-04 13:00 
GeneralRe: No private virtual methods? Pin
Nemanja Trifunovic13-Feb-04 14:38
Nemanja Trifunovic13-Feb-04 14:38 
GeneralRe: No private virtual methods? Pin
Heath Stewart13-Feb-04 16:57
protectorHeath Stewart13-Feb-04 16:57 
GeneralRe: No private virtual methods? Pin
Heath Stewart13-Feb-04 17:32
protectorHeath Stewart13-Feb-04 17:32 
To satisfy my own curiosity, I sat down and threw this together and you're right - it does work:
.assembly extern mscorlib
{
  .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )
  .ver 1:1:4322:0
}
.assembly Test
{
  .ver 1:0:0:0
}
.module Test.exe
.class public auto ansi Test
{
  .method public hidebysig static void Main() cil managed
  {
    .entrypoint
    .maxstack 2
    .locals init (class Test t)
    newobj instance void Test2::.ctor()
    stloc.0
    ldloc.0
    callvirt instance string Test::Print()
    call void [mscorlib]System.Console::WriteLine(string)
    ret
  }

  .method public hidebysig specialname instance void .ctor() cil managed
  {
    ret
  }

  .method private hidebysig virtual instance string Print() cil managed
  {
    .maxstack 1
    ldstr "From Test (Private)"
    ret
  }
}
.class public auto ansi Test2 extends Test
{
  .method public hidebysig specialname instance void .ctor() cil managed
  {
    ret
  }

  .method private hidebysig virtual instance string Print() cil managed
  {
    .maxstack 1
    ldstr "From Test2 (Private)"
    ret
  }
}


 

Microsoft MVP, Visual C#
My Articles
GeneralRe: No private virtual methods? Pin
leppie13-Feb-04 19:35
leppie13-Feb-04 19:35 
GeneralRe: No private virtual methods? Pin
Heath Stewart13-Feb-04 20:00
protectorHeath Stewart13-Feb-04 20:00 
GeneralRe: No private virtual methods? Pin
leppie13-Feb-04 23:31
leppie13-Feb-04 23:31 
GeneralSending Files Pin
David_cole13-Feb-04 9:32
David_cole13-Feb-04 9:32 
GeneralRe: Sending Files Pin
Not Active13-Feb-04 9:58
mentorNot Active13-Feb-04 9:58 
GeneralRe: Sending Files Pin
David_cole13-Feb-04 22:53
David_cole13-Feb-04 22:53 
GeneralIP Retrieval Pin
David_cole13-Feb-04 9:29
David_cole13-Feb-04 9:29 
GeneralRe: IP Retrieval Pin
Kentamanos13-Feb-04 10:43
Kentamanos13-Feb-04 10:43 
GeneralRe: IP Retrieval Pin
HAHAHA_NEXT16-Feb-04 7:57
HAHAHA_NEXT16-Feb-04 7:57 
GeneralHandling Task Switching Pin
raysot77713-Feb-04 9:16
raysot77713-Feb-04 9:16 
GeneralRe: Handling Task Switching Pin
Heath Stewart13-Feb-04 12:38
protectorHeath Stewart13-Feb-04 12:38 
Generalxml in windows forms Pin
rasarit1713-Feb-04 8:43
rasarit1713-Feb-04 8:43 
GeneralRe: xml in windows forms Pin
Heath Stewart13-Feb-04 12:36
protectorHeath Stewart13-Feb-04 12:36 
GeneralItembackground Color in ListBox Pin
Snowjim13-Feb-04 8:01
Snowjim13-Feb-04 8:01 
GeneralRe: Itembackground Color in ListBox Pin
Heath Stewart13-Feb-04 12:32
protectorHeath Stewart13-Feb-04 12:32 
GeneralRe: Itembackground Color in ListBox Pin
Snowjim13-Feb-04 14:27
Snowjim13-Feb-04 14:27 
GeneralRe: Itembackground Color in ListBox Pin
Heath Stewart13-Feb-04 16:48
protectorHeath Stewart13-Feb-04 16:48 

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.