-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Property definition C# #9771
Comments
|
I just tried it and it worked. Sorry about that. On Tue, Mar 15, 2016 at 6:40 PM, Petr Onderka notifications@github.com
Regards, Jose J. Moran |
@josejmoran I recommend reading up on the differences between a field and a property. |
I am talking about the property. Let's focus on the main idea: Not having The default constructor will be available to us and we can use it without On Tue, Mar 15, 2016 at 11:17 PM, Sam notifications@github.com wrote:
Regards, Jose J. Moran |
Thanks for the observation of difference between field and property. I just made a mistake there. I meant property. |
I didn't know that. |
Could you update the proposal to flesh out this concept? There's nothing there that describes constructors or field/property initializers. |
When I check the code generated by ASP.NET is see this:
... } I am proposing that a Default constructor should be made available for us A default constructor for all classes we create that will be available to Thanks. On Wed, Mar 16, 2016 at 10:59 AM, HaloFour notifications@github.com wrote:
Regards, Jose J. Moran |
Sorry, this is a different proposal. My bad. The property one is related to that when I type* prop tab tab* I always get My suggestion is that I should get: private Name; as the default and if I Thanks On Wed, Mar 16, 2016 at 11:19 AM, Jose Moran josejmoranh@gmail.com wrote:
Regards, Jose J. Moran |
If you don't actually want to write a property, and instead you want to write a field, then don't start with If you really want a snippet to write a field (whether confusingly called |
Looks to be a troll having some fun; see all suggested issues: https://github.com/josejmoran |
@josejmoran See #10154 for the current records proposal that may address your needs. |
Version Used: C# 6
Steps to Reproduce: When we create a class we need to add the properties and always add {get; set;}
It will be great if we only enter the property access level, type and name and the {get; set;} is only needed when we need to control something in the getter or setter of a property.
Now we need to do this: public int BookID { get; set; }
It will be great if we do this: public int BookID;
1.
2.
3.
Expected Behavior:
Actual Behavior:
The text was updated successfully, but these errors were encountered: