Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add introduction to creating data types #22671

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

Open
BillWagner opened this issue Feb 5, 2021 · 2 comments
Open

Add introduction to creating data types #22671

BillWagner opened this issue Feb 5, 2021 · 2 comments
Assignees
Labels
dotnet-csharp/svc get-started/subsvc ๐Ÿ“Œ seQUESTered Identifies that an issue has been imported into Quest.

Comments

@BillWagner
Copy link
Member

BillWagner commented Feb 5, 2021

Now, with C# 9, there are a number of different ways to create data types in C#:

  • tuples
  • records
  • anonymous types
  • classes
  • structs

Tuples and records, in particular, are great concepts for beginners to learn to build data structures. They both should be introduced before classes.

Open question: Should structs and interfaces be part of this series, or in the fundamentals section?


Document Details

โš  Do not edit this section. It is required for docs.microsoft.com โžŸ GitHub issue linking.


Associated WorkItem - 400547

@scottaddie
Copy link
Member

I recommend covering interfaces only when classes are introduced, as that's when you're likely to introduce polymorphism. For a .NET dev to be successful with concepts like dependency injection in ASP.NET Core, an understanding of interfaces is essential. I also think it would be unfair to cover C# data types without mention of structs. Sure, they're not as commonly used as classes and interfaces, but it's all about using the right tool for the job.

@IEvangelist
Copy link
Member

Open question: Should structs and interfaces be part of this series, or in the fundamentals section?

As an introduction to creating data types, they should at least be called out as possible data types. Perhaps a table that outlines some common usages of the types, so that at a glance the consumer can see when it might make sense to create a specific type of object.

@BillWagner BillWagner added the ๐Ÿ—บ๏ธ reQUEST Triggers an issue to be imported into Quest. label Feb 28, 2025
@dotnetrepoman dotnetrepoman bot added the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Feb 28, 2025
@dotnet-policy-service dotnet-policy-service bot removed the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Feb 28, 2025
@dotnetrepoman dotnetrepoman bot added the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Feb 28, 2025
@dotnet-policy-service dotnet-policy-service bot removed the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Feb 28, 2025
@sequestor sequestor bot added ๐Ÿ“Œ seQUESTered Identifies that an issue has been imported into Quest. and removed ๐Ÿ—บ๏ธ reQUEST Triggers an issue to be imported into Quest. labels Feb 28, 2025
@dotnetrepoman dotnetrepoman bot added the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Mar 4, 2025
@dotnet-policy-service dotnet-policy-service bot removed the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Mar 4, 2025
@dotnetrepoman dotnetrepoman bot added the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Mar 4, 2025
@dotnet-policy-service dotnet-policy-service bot removed the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Mar 4, 2025
@dotnetrepoman dotnetrepoman bot added the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Mar 4, 2025
@dotnet-policy-service dotnet-policy-service bot removed the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Mar 4, 2025
@dotnetrepoman dotnetrepoman bot added the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Apr 2, 2025
@BillWagner BillWagner moved this from ๐Ÿ”– Ready to Slipped in dotnet/docs March 2025 sprint project Apr 2, 2025
@dotnet-policy-service dotnet-policy-service bot removed the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Apr 2, 2025
@dotnetrepoman dotnetrepoman bot added the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Apr 2, 2025
@dotnet-policy-service dotnet-policy-service bot removed the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Apr 2, 2025
@dotnetrepoman dotnetrepoman bot added the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Apr 2, 2025
@dotnet-policy-service dotnet-policy-service bot removed the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Apr 2, 2025
@BillWagner BillWagner moved this from ๐Ÿ”– Ready to Slipped in dotnet/docs April 2025 sprint project May 1, 2025
@dotnetrepoman dotnetrepoman bot added the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label May 1, 2025
@dotnet-policy-service dotnet-policy-service bot removed the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label May 1, 2025
@dotnetrepoman dotnetrepoman bot added the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label May 1, 2025
@dotnet-policy-service dotnet-policy-service bot removed the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet-csharp/svc get-started/subsvc ๐Ÿ“Œ seQUESTered Identifies that an issue has been imported into Quest.
Projects
Status: ๐Ÿ”– Ready
Development

No branches or pull requests

5 participants