---
title: "Discussion on \"TIL C# property overrides are separate for getters and setters\" | Hashnode"
description: "Discussion on \"TIL C# property overrides are separate for getters and setters\". I recently hit an interesting gotcha with some code in a C# codebase i was working with. It baffled me because I didn’t understand how this could compile.\nMyClass.Foo has a getter but no setter, yet an instantiated MyClass can have the Foo property s..."
url: "https://hashnode.com/posts/til-c-property-overrides-are-separate-for-getters-and-setters/6974e27013c09bb90c027654"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [TIL C# property overrides are separate for getters and setters](https://techblog.timhilton.xyz/til-c-property-overrides-are-separate-for-getters-and-setters?utm_source=hashnode&utm_medium=feed)

I recently hit an interesting gotcha with some code in a C# codebase i was working with. It baffled me because I didn’t understand how this could compile. MyClass.Foo has a getter but no setter, yet an instantiated MyClass can have the Foo property s...

Jan 24 · 1 min read · techblog.timhilton.xyz  
Read the article

-   [#csharp](https://hashnode.com/tag/csharp)
-   [#override](https://hashnode.com/tag/override)
-   [#getter-and-setter](https://hashnode.com/tag/getter-and-setter)
-   [#til](https://hashnode.com/tag/til)

## Written by

[Tim Hilton](https://hashnode.com/@tjhilton)

@tjhilton

  
[View profile](https://hashnode.com/@tjhilton)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
