How creat a string class use the char*?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ironpythonster@gmail.com

    How creat a string class use the char*?

    Hi everyone,there is a simply question puzzle me:
    Under the CPP,where can use the char* to creat
    a string class for use,but under the .NET Framework?
    How to use C# to creat a string class as the BCL suppert??
    It can do this work?

    PS: I read from the code of SSCLI,It is found that when BCL implent the

    string ,it calll for an model of the runtime lib.

  • Jon Skeet [C# MVP]

    #2
    Re: How creat a string class use the char*?

    <ironpythonster @gmail.comwrote :
    Hi everyone,there is a simply question puzzle me:
    Under the CPP,where can use the char* to creat
    a string class for use,but under the .NET Framework?
    How to use C# to creat a string class as the BCL suppert??
    It can do this work?
    >
    PS: I read from the code of SSCLI,It is found that when BCL implent the
    >
    string ,it calll for an model of the runtime lib.
    It's not exactly clear what you're trying to do. What's wrong with the
    String class?

    String has a couple of properties which you can't mimic in your own
    code. In particular, it's the only type other than arrays whose size
    isn't known from the type definition.

    --
    Jon Skeet - <skeet@pobox.co m>
    http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
    If replying to the group, please do not mail me too

    Comment

    • Kevien Lee

      #3
      Re: How creat a string class use the char*?

      the string class is so good,butI just want to konwm how the string
      class implent?

      Jon wrote:
      <ironpythonster @gmail.comwrote :
      Hi everyone,there is a simply question puzzle me:
      Under the CPP,where can use the char* to creat
      a string class for use,but under the .NET Framework?
      How to use C# to creat a string class as the BCL suppert??
      It can do this work?

      PS: I read from the code of SSCLI,It is found that when BCL implent the

      string ,it calll for an model of the runtime lib.
      >
      It's not exactly clear what you're trying to do. What's wrong with the
      String class?
      >
      String has a couple of properties which you can't mimic in your own
      code. In particular, it's the only type other than arrays whose size
      isn't known from the type definition.
      >
      --
      Jon Skeet - <skeet@pobox.co m>
      http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
      If replying to the group, please do not mail me too

      Comment

      • Jon Skeet [C# MVP]

        #4
        Re: How creat a string class use the char*?

        Kevien Lee <ironpythonster @gmail.comwrote :
        the string class is so good,butI just want to konwm how the string
        class implent?
        Well, you can download Rotor and look at the implementation there. It's
        not the kind of class you'd implement yourself though.

        --
        Jon Skeet - <skeet@pobox.co m>
        http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
        If replying to the group, please do not mail me too

        Comment

        Working...