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

  • SEARCH
  • Home
  • 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 1040585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:14:33+00:00 2026-05-16T15:14:33+00:00

In the code below the Move public class derives fromthe generic type Submit. Submit

  • 0

In the code below the “Move” public class derives fromthe generic type “Submit”. “Submit” is a method, part of the DSS model, which handles messages and accepts two parameters, one is the message body and one is the message response.

My question is: How or WHY does a class derive from a method?!

It seems to me (since i’m only a beginner) “generic types” mean just this… any method or class (and by extension, any “block” of code) can become a type. Moreover there are NO types… everything is just a “class” which you can derive from (yet you probably can’t overload string)

This basicly means that there are in fact NO methods OR types, but rather just classes (and some “sub”classes (ex-methods)) and you can derive from everything?!

Thank you.
I’m not looking for the expert “except this” answear where some small thing is not possible. I would like confirmation that this is, in fact, what 90% of the time, programmers are doing.

  public class Move : Submit<MoveRequest, PortSet<DefaultSubmitResponseType, Fault>>
  {
    public Move()
    {
    }

    public Move(MoveRequest body) : base(body)
    {
    }

  }
  • 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-16T15:14:33+00:00Added an answer on May 16, 2026 at 3:14 pm

    in a little more detail, Submit may be an “action” and therefore commonly thought of as a method, but in your context, Submit is indeed a class. This may be an example of the “Command” design pattern, in which a request for an action is encapsulated in an object and thus can be passed around and acted on by classes that handle the command.

    Generics, conceptually speaking, are classes that are able to provide similar functionality among a set of “inner” types. The basic example is a Math class that can add, subtract, multiply and divide two variables of numeric type; you know, very advanced math you can’t do any other way. There are a lot of numeric types in most type systems (in C# you have byte, short, int, long, float, double, and decimal, plus unsigned variations). Rather than implement a MathByte, MathInt, MathLong, etc with methods strongly defining the type they work on, or implementing a Math class that works with any Object (and thus requires you to examine the type of everything passed in to determine that you can work with the type), you can simply create a Math<T> class, where T can be any of the numeric types.

    The type parameter T is different from method parameters; when you declare an instance of the class, you specify a type that the instance will be set up to handle. That instance can then only work with objects of the specified type, but you can instantiate a Math<byte> and a Math<decimal> to work with different types. Methods defined in Math specify input parameters of type T, and T is “replaced” at instantiation with the type declared when you instantiate the class.

    Generics help support the DRY (“Don’t Repeat Yourself”) tenet of good coding practice, while maintaining type integrity. MathLong, MathInt, MathByte etc would all be similar or identical in their internal code; the main difference would be the type of the object they work on. Instead of rewriting the same class 10 times, you write one class that can be more concretely defined as to its working type by consumers of your class.

    Hope this is a little more educational.

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

Sidebar

Related Questions

Code below is working well as long as I have class ClassSameAssembly in same
The code below fails on the line: Class.forName(oracle.jdbc.driver.OracleDriver); with the error: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver The
I have the code below: namespace WindowMover { using System.Windows.Forms; static class Logic {
I use below code to move window's form, move work fine, but problem is
In the code below, C's base class B1's template argument OFFSET depends on B0,
I have the code below which I am using from an Android java tutorial.
Code below is used to save PostgreSql database backup from browser in Apache Mono
The code below simply didn't work. document.getElementById('files').addEventListener('change', handleFileSelect, false); reported by firebug that this
This code below allows me to find the word error in all my files
My code below gave a different length for the unsigned char pointer I expect.

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.