SlideShare a Scribd company logo
Rainer Stropek | software architects 
High Quality C#
Introduction 
• General conditions and processes are important 
– Requirements Engineering 
– Project Management (e.g. SCRUM) 
– Team culture 
– Processes (e.g. Code Reviews) 
– Testing (automated and manual) 
– Tools 
• In this session we focus on the core C# code, not the 
surrounding processes
Why are coding standards important? 
• Code is easier to understand for new team members 
(internal and external) 
– Example: Try… naming schema 
• Shared or Weak Code Ownership gets easier 
• Contracts 
– Obligation to document 
– Clause „state of the art“ 
• Simpler, cleaner contracts 
– Freelancers, subcontractors 
• Avoid worst practices, follow proven practices 
– More robust, less error-prone code
Tools (examples) 
• Microsoft 
– C# warnings 
– Visual Studio Code Analysis 
– New possibilities of the Roslyn platform 
• Community 
– StyleCop 
– Sandcastle 
• Commercial 3rd party tools 
– ReSharper
StyleCop 
• Analyzes C# source code to enforce 
style and consistency rules 
• Runs in Visual Studio and during build
StyleCop Tips
High Quality C# - Codequality in Practice
Documentation 
• Not to underestimate 
– Drives acceptance by end users 
• What is good documentation? 
– Conceptual content 
– Examples 
– Not just generated text 
– Completeness
Documentation
High Quality C# - Codequality in Practice
Code Analysis 
• Analyzes managed code assemblies 
• Enforces design rules of Microsoft’s 
Framework Design Guidelines
Code Analysis Tips
Code Analysis Tips
StyleCop & Code Analysis in Build Process
Roslyn 
• New compiler framework 
• Compiler as a service
High Quality C# - Codequality in Practice
Roslyn Demo
Summary 
• Automate code quality rules as far as possible 
– Saves a lot of time especially in larger teams 
– Code quality rules documented in a stand-alone text file will 
not be read 
• Use proven best practices instead of developing 
everything from scratch 
– Stop discussing! 
• Customize tooling to your needs 
– Not all rules make sense for all projects (e.g. legacy code vs. 
new code)

More Related Content

PPTX
Agile and Scrum Workshop
PPTX
Agile methodology and scrum development
PDF
Introduction to TDD
PPT
Summer Scrum Public
PDF
Agile engineering practices – a short overview
PPTX
Agile
PPTX
Scrum plus – why scrum is not enough for successful delivery
PPTX
Introduction to Scrum
Agile and Scrum Workshop
Agile methodology and scrum development
Introduction to TDD
Summer Scrum Public
Agile engineering practices – a short overview
Agile
Scrum plus – why scrum is not enough for successful delivery
Introduction to Scrum

What's hot (20)

PPTX
Practical DevOps
PPTX
Scrum Plus Extreme Programming (XP) for Hyper Productivity
PPTX
Kanban 101
PPTX
ScrumOps - Scrum + Practical DevOps
PDF
Agile Process Introduction
PPT
Kanban VS Scrum
PDF
The Portal Builder Story: From Hell to Lean, from Zero to Cloud - part 2
PPTX
Extreme programming - a quick and agile overview !
PPTX
agile vs. traditional methodologies
PPTX
Overview: Agile Methodology and Scrum
PPTX
Going extreme-with-extreme-programming
PDF
eXtreme programming (XP) - An Overview
PDF
Introduction to Agile Development
PPTX
Xp(Xtreme Programming) presentation
PDF
XP In 10 slides
PPTX
Extreme Programming (XP): Revisted
PPT
XP Explained
PPTX
Overview of agile methodology
PPTX
Lean Software 101
PPT
Agile Methods 101 Bar Camp 2007
Practical DevOps
Scrum Plus Extreme Programming (XP) for Hyper Productivity
Kanban 101
ScrumOps - Scrum + Practical DevOps
Agile Process Introduction
Kanban VS Scrum
The Portal Builder Story: From Hell to Lean, from Zero to Cloud - part 2
Extreme programming - a quick and agile overview !
agile vs. traditional methodologies
Overview: Agile Methodology and Scrum
Going extreme-with-extreme-programming
eXtreme programming (XP) - An Overview
Introduction to Agile Development
Xp(Xtreme Programming) presentation
XP In 10 slides
Extreme Programming (XP): Revisted
XP Explained
Overview of agile methodology
Lean Software 101
Agile Methods 101 Bar Camp 2007
Ad

Similar to High Quality C# - Codequality in Practice (20)

PPT
Unified modeling language basics and slides
PDF
Object Pascal Clean Code Guidelines Proposal (at EKON 22)
PPTX
Coding Standard And Code Review
PPTX
An overview of agile methodologies
PPTX
Lean-Agile Development with SharePoint - Bill Ayers
PDF
Enforcing Style Guide Rules for Technical Documents
PPSX
Scope of software engineering
PPT
Manual Software testing - software development life cycle
PPTX
Agile MDD
PDF
Test driven development : software process
ODP
PHP Code Quality
PPTX
Things to ponder before you start building [cooperate] software
PPTX
Issues in Rapid Application Development
PPTX
SCM Patterns for Agile Architectures
PPTX
Mg6088 spm unit-2
PDF
Code Inspection
PPT
UML Basics Department of CSE, SARANATHAN
PPTX
week9 object oriented analysis and design.pptx
PPTX
Software Process Models
Unified modeling language basics and slides
Object Pascal Clean Code Guidelines Proposal (at EKON 22)
Coding Standard And Code Review
An overview of agile methodologies
Lean-Agile Development with SharePoint - Bill Ayers
Enforcing Style Guide Rules for Technical Documents
Scope of software engineering
Manual Software testing - software development life cycle
Agile MDD
Test driven development : software process
PHP Code Quality
Things to ponder before you start building [cooperate] software
Issues in Rapid Application Development
SCM Patterns for Agile Architectures
Mg6088 spm unit-2
Code Inspection
UML Basics Department of CSE, SARANATHAN
week9 object oriented analysis and design.pptx
Software Process Models
Ad

Recently uploaded (20)

PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Modernizing your data center with Dell and AMD
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Machine learning based COVID-19 study performance prediction
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Empathic Computing: Creating Shared Understanding
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
A Presentation on Artificial Intelligence
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
Mobile App Security Testing_ A Comprehensive Guide.pdf
Modernizing your data center with Dell and AMD
Advanced methodologies resolving dimensionality complications for autism neur...
Machine learning based COVID-19 study performance prediction
“AI and Expert System Decision Support & Business Intelligence Systems”
Empathic Computing: Creating Shared Understanding
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Agricultural_Statistics_at_a_Glance_2022_0.pdf
The AUB Centre for AI in Media Proposal.docx
Network Security Unit 5.pdf for BCA BBA.
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
A Presentation on Artificial Intelligence
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Building Integrated photovoltaic BIPV_UPV.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Unlocking AI with Model Context Protocol (MCP)

High Quality C# - Codequality in Practice

  • 1. Rainer Stropek | software architects High Quality C#
  • 2. Introduction • General conditions and processes are important – Requirements Engineering – Project Management (e.g. SCRUM) – Team culture – Processes (e.g. Code Reviews) – Testing (automated and manual) – Tools • In this session we focus on the core C# code, not the surrounding processes
  • 3. Why are coding standards important? • Code is easier to understand for new team members (internal and external) – Example: Try… naming schema • Shared or Weak Code Ownership gets easier • Contracts – Obligation to document – Clause „state of the art“ • Simpler, cleaner contracts – Freelancers, subcontractors • Avoid worst practices, follow proven practices – More robust, less error-prone code
  • 4. Tools (examples) • Microsoft – C# warnings – Visual Studio Code Analysis – New possibilities of the Roslyn platform • Community – StyleCop – Sandcastle • Commercial 3rd party tools – ReSharper
  • 5. StyleCop • Analyzes C# source code to enforce style and consistency rules • Runs in Visual Studio and during build
  • 8. Documentation • Not to underestimate – Drives acceptance by end users • What is good documentation? – Conceptual content – Examples – Not just generated text – Completeness
  • 11. Code Analysis • Analyzes managed code assemblies • Enforces design rules of Microsoft’s Framework Design Guidelines
  • 14. StyleCop & Code Analysis in Build Process
  • 15. Roslyn • New compiler framework • Compiler as a service
  • 18. Summary • Automate code quality rules as far as possible – Saves a lot of time especially in larger teams – Code quality rules documented in a stand-alone text file will not be read • Use proven best practices instead of developing everything from scratch – Stop discussing! • Customize tooling to your needs – Not all rules make sense for all projects (e.g. legacy code vs. new code)