Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Operator Over Loading

Operator Over Loading

Scheduled Pinned Locked Moved C#
csharpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sendilkumar M
    wrote on last edited by
    #1

    Hi all Can any one explain why C# does not suport for overloading =,.,sizeof,new operators? I am in the need to overload the operator '='.Is there any other way to redifine the functionality of '='. M.Sendilkumar

    D 1 Reply Last reply
    0
    • S Sendilkumar M

      Hi all Can any one explain why C# does not suport for overloading =,.,sizeof,new operators? I am in the need to overload the operator '='.Is there any other way to redifine the functionality of '='. M.Sendilkumar

      D Offline
      D Offline
      Daniel Turini
      wrote on last edited by
      #2

      Sendilkumar.M wrote: Can any one explain why C# does not suport for overloading =,.,sizeof,new operators? I am in the need to overload the operator '='.Is there any other way to redifine the functionality of '='. Probably because the environment is garbage collected. Those operators you describe are tipically used when you need to implement your own memory management mechanism in C++. This is simply not possible in C#. About the '.' operator (in C++, the '->' operator), you don't need it because C# has property get/set pairs, so it's a much more elegant and simple solution to the same problem. Yes, even I am blogging now!

      S 1 Reply Last reply
      0
      • D Daniel Turini

        Sendilkumar.M wrote: Can any one explain why C# does not suport for overloading =,.,sizeof,new operators? I am in the need to overload the operator '='.Is there any other way to redifine the functionality of '='. Probably because the environment is garbage collected. Those operators you describe are tipically used when you need to implement your own memory management mechanism in C++. This is simply not possible in C#. About the '.' operator (in C++, the '->' operator), you don't need it because C# has property get/set pairs, so it's a much more elegant and simple solution to the same problem. Yes, even I am blogging now!

        S Offline
        S Offline
        Sendilkumar M
        wrote on last edited by
        #3

        Tnx a lot M.Sendilkumar

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups