.net - Redefining C# keywords? -


To use Int64 instead of Int32, replace a C # keyword such as int Is it possible to define from?

If not, how can this be done? I want to get the flexibility to redefine the int user, so later I can change it to int64 if I want to go all around instead of changing all the int values ​​manually.

No, it is not possible and you should not really do this. Redefining the keyword for custom values ​​will only provide your code for less readable and up-to-date. People starting for your code base will have to forget everything about C # defaults and they will have to learn their default is not a good way to build a satisfactory code base.

Whatever you should consider, is making a new type of name and using the alias "to redirect that type on the basis of code".

  using FexibleInt = System.Int32;  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -