[java] Equivalent of Super Keyword in C#

What is the equivalent c# keyword of super keyword (java).

My java code :

public class PrintImageLocations extends PDFStreamEngine
{
    public PrintImageLocations() throws IOException
    {
        super( ResourceLoader.loadProperties( "org/apache/pdfbox/resources/PDFTextStripper.properties", true ) );
    } 

     protected void processOperator( PDFOperator operator, List arguments ) throws IOException
    {
     super.processOperator( operator, arguments );
    }

Now what exactly I need equivalent of super keyword in C# initially tried with base whether the way I have used the keyword base in right way

class Imagedata : PDFStreamEngine
{
   public Imagedata() : base()
   {                                          
         ResourceLoader.loadProperties("org/apache/pdfbox/resources/PDFTextStripper.properties", true);
   }

   protected override void processOperator(PDFOperator operations, List arguments)
   {
      base.processOperator(operations, arguments);
   }
}

Can any one help me out.

This question is related to java c# super base

The answer is


C# equivalent of your code is

  class Imagedata : PDFStreamEngine
  {
     // C# uses "base" keyword whenever Java uses "super" 
     // so instead of super(...) in Java we should call its C# equivalent (base):
     public Imagedata()
       : base(ResourceLoader.loadProperties("org/apache/pdfbox/resources/PDFTextStripper.properties", true)) 
     { }

     // Java methods are virtual by default, when C# methods aren't.
     // So we should be sure that processOperator method in base class 
     // (that is PDFStreamEngine)
     // declared as "virtual"
     protected override void processOperator(PDFOperator operations, List arguments)
     {
        base.processOperator(operations, arguments);
     }
  }

Examples related to java

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How much should a function trust another function How to implement a simple scenario the OO way Two constructors How do I get some variable from another class in Java? this in equals method How to split a string in two and store it in a field How to do perspective fixing? String index out of range: 4 My eclipse won't open, i download the bundle pack it keeps saying error log

Examples related to c#

How can I convert this one line of ActionScript to C#? Microsoft Advertising SDK doesn't deliverer ads How to use a global array in C#? How to correctly write async method? C# - insert values from file into two arrays Uploading into folder in FTP? Are these methods thread safe? dotnet ef not found in .NET Core 3 HTTP Error 500.30 - ANCM In-Process Start Failure Best way to "push" into C# array

Examples related to super

Equivalent of Super Keyword in C# super() raises "TypeError: must be type, not classobj" for new-style class Java: Calling a super method which calls an overridden method When do I use super()? super() in Java What is PECS (Producer Extends Consumer Super)? super() fails with error: TypeError "argument 1 must be type, not classobj" when parent does not inherit from object Understanding Python super() with __init__() methods What does 'super' do in Python?

Examples related to base

Remove category & tag base from WordPress url - without a plugin Equivalent of Super Keyword in C# How to convert an integer to a string in any base? Quickest way to convert a base 10 number to any base in .NET? How to convert decimal to hexadecimal in JavaScript