Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6159235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:05:50+00:00 2026-05-23T21:05:50+00:00

As you all know using java it is possible to create methods which require

  • 0

As you all know using java it is possible to create methods which require one or more objects extended from another class; to do this you have to write:

public void method(Class<? extends class_name> Object_name)

I was wondering whether there is a corresponding statement in C#. Does anybody know?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T21:05:50+00:00Added an answer on May 23, 2026 at 9:05 pm

    Well, that’s accepting a type rather than an object, but you can do something slightly similar with generic methods in C#:

    public void Foo<T>() where T : MyClass
    

    Then you can use typeof(T) within the method.

    If you need to specify an actual object compatible with type T, you can have that as a normal method parameter of type T.

    If you need more, please update your question with more specific requirements.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anybody know if there is a way using java to pass all the
I wish to know all the pros and cons about using these two methods.
Are all URLs encrypted when using TLS/SSL (HTTPS) encryption? I would like to know
Is it possible to create an IntentFilter in android that matches ALL intents that
I'm looking to create a set of functions which all implementations of a certain
I would like to get all possible available currencies. Java 7 had provided such
Our project uses XJC to generate Java classes from an XSD. I'm using JAVA
We all know T-SQL's string manipulation capabilities sometimes leaves much to be desired... I
We all know how to use <ctrl>-R to reverse search through history, but did
We all know that RAW pointers need to be wrapped in some form of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.