none
how to inherit value type or rename it RRS feed

  • Question

  • Dear Everyone.

    i know not to inherit value type, i need to change the name of value type to any Name.

    for example)

    int i = 0;  ---> i want to change it to like below

    S32 i = 0;

    so i have tried to inherit value type, but i can't inherit it , because the type is struct type.

    Someone have a idea what i want to do.

    Thanks.

     

     


    lightdoll
    Tuesday, September 7, 2010 11:31 AM

Answers

  • Hi,

    What reason could you have to change the name of a .NET type? In this case it would involve actually changing the syntax of the C# language, since int is just syntactic sugar for System.Int32. I think you have to be a little bit more specific about your reasoning behind the suggested change. That will help other people to understand you problem and also give them better opportunities to help you.

    Hope this helps
    Meile Zetstra

    • Marked as answer by SamAgain Wednesday, September 15, 2010 9:35 AM
    Tuesday, September 7, 2010 12:07 PM
  • In .net value type are sealed therefore we cannot use them as base class.


    Abhinav Galodha
    • Marked as answer by SamAgain Wednesday, September 15, 2010 9:35 AM
    Tuesday, September 7, 2010 1:33 PM

All replies

  • Hi,

    What reason could you have to change the name of a .NET type? In this case it would involve actually changing the syntax of the C# language, since int is just syntactic sugar for System.Int32. I think you have to be a little bit more specific about your reasoning behind the suggested change. That will help other people to understand you problem and also give them better opportunities to help you.

    Hope this helps
    Meile Zetstra

    • Marked as answer by SamAgain Wednesday, September 15, 2010 9:35 AM
    Tuesday, September 7, 2010 12:07 PM
  • In .net value type are sealed therefore we cannot use them as base class.


    Abhinav Galodha
    • Marked as answer by SamAgain Wednesday, September 15, 2010 9:35 AM
    Tuesday, September 7, 2010 1:33 PM
  • Would be really nice to change the name of base types, default signed integers is just... ew
    Tuesday, January 8, 2013 8:48 PM