---
title: "Reactive Extensions (Rx) - Part 3 - Naming Conventions - Muhammad Rehan Saeed"
description: "Reactive Extensions (Rx) Advantages of using IObservable property naming conventions and comparison between C# events."
canonical_url: "https://rehansaeed.com/reactive-extensions-part3-naming-conventions/"
last_updated: "2014-02-14T00:00:00+00:00"
meta:
  author: "Muhammad Rehan Saeed"
  keywords: ".NET,C#,Events,Naming Convention,Reactive Extensions,Rx,Standards"
  "og:description": "Reactive Extensions (Rx) Advantages of using IObservable property naming conventions and comparison between C# events."
  "og:image": "https://rehansaeed.com/_og/s/o_fd0c42c7541d15e7.png"
  "og:image:alt": "Reactive Extensions (Rx) - Part 3 - Naming Conventions - Muhammad Rehan Saeed"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Reactive Extensions (Rx) - Part 3 - Naming Conventions"
  "twitter:image": "https://rehansaeed.com/_og/s/o_fd0c42c7541d15e7.png"
  "twitter:image:alt": "Reactive Extensions (Rx) - Part 3 - Naming Conventions - Muhammad Rehan Saeed"
---

> Index of every page on this site: [llms.txt](https://rehansaeed.com/llms.txt)

# [Reactive Extensions (Rx) - Part 3 - Naming Conventions](https://rehansaeed.com/reactive-extensions-part3-naming-conventions/)

Posted 14 February 2014 - **2 min read**

![Reactive Extensions](https://rehansaeed.com/_ipx/f_png&s_2560x1440/images/hero/Reactive-Extensions-1366x768.png)

1. [Reactive Extensions (Rx) - Replacing C# Events](https://rehansaeed.com/reactive-extensions-part1-replacing-events/)
2. [Reactive Extensions (Rx) - Wrapping C# Events](https://rehansaeed.com/reactive-extensions-part2-wrapping-events/)
3. [Reactive Extensions (Rx) - Naming Conventions](https://rehansaeed.com/reactive-extensions-part3-naming-conventions/)
4. [Reactive Extensions (Rx) - Replacing Timers](https://rehansaeed.com/reactive-extensions-part4-replacing-timers/)
5. [Reactive Extensions (Rx) - Awaiting Observables](https://rehansaeed.com/reactive-extensions-part5-awaiting-observables/)
6. [Reactive Extensions (Rx) - Task ToObservable](https://rehansaeed.com/reactive-extensions-part6-task-toobservable/)
7. [Reactive Extensions (Rx) - Sample Events](https://rehansaeed.com/reactive-extensions-part7-sample-events/)
8. [Reactive Extensions (Rx) - Timeouts](https://rehansaeed.com/reactive-extensions-rx-part-8-timeouts/)

Standard C# events do not have any real naming convention, except using the English language to suggest that something has happened e.g. `PropertyChanged`. Should a property returning an `IObservable<T>` have a naming convention? I'm not entirely certain but I'll explain why I have used one and why.

C# events are easily differentiated in a class from properties and methods because they have a different icon in the Visual Studio Intelli-Sense. Visual Studio does not provide `IObservable<T>` properties any differentiation. This may change in the future if Microsoft decides to integrate Reactive Extensions (Rx) more deeply into Visual Studio.

The second reason for using a naming convention is that I often wrap existing C# events with a Reactive Extensions event. It's not possible to have the same name for a C# event and an `IObservable<T>` property.

You will have noticed already if you've looked at my previous posts that I use the word 'When' prefixed before the name of the property. I believe, this nicely indicates that an event has occurred and also groups all our Reactive Extension event properties together under Intelli-Sense.

```cs
public IObservable<string> WhenPropertyChanged
{
    get { ... };
}
```

I have read in a few places people suggesting that so called 'Hot' and 'Cold' (See [here](http://stackoverflow.com/questions/2521277/what-are-the-hot-and-cold-observables) for an explanation) observables should have different naming conventions. I personally feel that this is an implementation detail and I can't see why the subscriber to an event would need to know that an event was 'Hot' or 'Cold' (Prove me wrong). Also, trying to teach this concept to other developers and get them to implement it would mean constantly looking up the meanings (I keep forgetting myself), whereas using 'When' is a nice simple concept which anyone can understand.

This is a pretty open question at the moment. What are your thoughts on the subject?

## Web Mentions

[What's this?](https://en.wikipedia.org/wiki/Webmention)

### 0 Linked

### 0 Replies

## GitHub Comments

### 4 Comments

[Comment on GitHub](https://github.com/RehanSaeed/rehansaeed.github.io/issues/105)

[![RehanSaeed](https://avatars.githubusercontent.com/u/2270364?v=4)](https://github.com/RehanSaeed)

### [RehanSaeed](https://github.com/RehanSaeed)

Owner

12 May 2020

[![Pyry Jahkola](https://camo.githubusercontent.com/718d5a39a759a5b1508b4209255cb62781797af708a6afc7c908595a0e5c19f8/68747470733a2f2f7777772e67726176617461722e636f6d2f6176617461722f61643361623537376263343237313062306437346236656264343536393337393f733d393626643d6d6d26723d67)](https://camo.githubusercontent.com/718d5a39a759a5b1508b4209255cb62781797af708a6afc7c908595a0e5c19f8/68747470733a2f2f7777772e67726176617461722e636f6d2f6176617461722f61643361623537376263343237313062306437346236656264343536393337393f733d393626643d6d6d26723d67) **[Pyry Jahkola](http://twitter.com/pyrtsa)** commented on **2014-02-14 23:52:14**

I think these [naming guidelines](https://github.com/ReactiveCocoa/ReactiveSwift/blob/master/Documentation/DesignGuidelines.md) from the Objective-C port of Rx were pretty sensible.

[![RehanSaeed](https://avatars.githubusercontent.com/u/2270364?v=4)](https://github.com/RehanSaeed)

### [RehanSaeed](https://github.com/RehanSaeed)

Owner

12 May 2020

[![Muhammad Rehan Saeed](https://camo.githubusercontent.com/8a07049df41b8a3839a3f4342f09ea8e6e7fa0065667687f04beca2d088a1dca/68747470733a2f2f7777772e67726176617461722e636f6d2f6176617461722f32623266393030653361633066353535316462646537323864336262343935343f733d393626643d6d6d26723d67)](https://camo.githubusercontent.com/8a07049df41b8a3839a3f4342f09ea8e6e7fa0065667687f04beca2d088a1dca/68747470733a2f2f7777772e67726176617461722e636f6d2f6176617461722f32623266393030653361633066353535316462646537323864336262343935343f733d393626643d6d6d26723d67) **Muhammad Rehan Saeed** commented on **2014-02-15 08:17:03**

I had no idea Objective-C had Rx. Very Interesting guidelines. Especially for the side effects. Had not thought of that.

[![RehanSaeed](https://avatars.githubusercontent.com/u/2270364?v=4)](https://github.com/RehanSaeed)

### [RehanSaeed](https://github.com/RehanSaeed)

Owner

12 May 2020

[![Neil Highley](https://camo.githubusercontent.com/305316b4386fdeba5cff4322d99c9b2a34ccc14fbf679a7735dba24af62aa687/68747470733a2f2f7777772e67726176617461722e636f6d2f6176617461722f39306531353130326562303430373534326235663235363836333038626661383f733d393626643d6d6d26723d67)](https://camo.githubusercontent.com/305316b4386fdeba5cff4322d99c9b2a34ccc14fbf679a7735dba24af62aa687/68747470733a2f2f7777772e67726176617461722e636f6d2f6176617461722f39306531353130326562303430373534326235663235363836333038626661383f733d393626643d6d6d26723d67) **[Neil Highley](http://www.neilhighley.com/)** commented on **2017-01-25 12:22:09**

Updted link: https://github.com/ReactiveCocoa/ReactiveSwift/blob/master/Documentation/DesignGuidelines.md

[![RehanSaeed](https://avatars.githubusercontent.com/u/2270364?v=4)](https://github.com/RehanSaeed)

### [RehanSaeed](https://github.com/RehanSaeed)

Owner

12 May 2020

[![Lars StÃ¸ttrup Nielsen](https://camo.githubusercontent.com/9a71b7ef9602e9aab8774a90a18f5c42349f3353d1b0c1ec50b3ad3ab86f95f0/68747470733a2f2f7777772e67726176617461722e636f6d2f6176617461722f63363662376662346563343738313336346633633762393465393865333066373f733d393626643d6d6d26723d67)](https://camo.githubusercontent.com/9a71b7ef9602e9aab8774a90a18f5c42349f3353d1b0c1ec50b3ad3ab86f95f0/68747470733a2f2f7777772e67726176617461722e636f6d2f6176617461722f63363662376662346563343738313336346633633762393465393865333066373f733d393626643d6d6d26723d67) **Lars StÃ¸ttrup Nielsen** commented on **2017-05-22 14:01:34**

Not really sure where I stand yet on the hot vs cold naming convention.

But it can be relevant for a consumer to know what the observable he's subscribing to is: hot or cold.

```
hotObservable.toArray().subscribe() // will never finish due to the way toArray works.
coldObservable.toArray().subscribe() // will finish.
```

The consumer would have to use `.take(n)` on all his observables, in order to force them to complete, even when not required (such as cold observables).

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://rehansaeed.com/#website","@type":"WebSite","description":"Software Developer at Microsoft, YouTuber, Open Source Contributor and Blogger","inLanguage":"en-GB","name":"Muhammad Rehan Saeed","url":"https://rehansaeed.com/","author":{"@id":"https://rehansaeed.com/#identity"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://rehansaeed.com/?search={search_term_string}"},"query-input":"required name=search_term_string"}],"publisher":{"@id":"https://rehansaeed.com/#publisher"}},{"@id":"https://rehansaeed.com/reactive-extensions-part3-naming-conventions/#webpage","@type":"WebPage","dateModified":"2014-02-14T00:00:00+00:00","datePublished":"2014-02-14T00:00:00+00:00","description":"Reactive Extensions (Rx) Advantages of using IObservable property naming conventions and comparison between C# events.","name":"Reactive Extensions (Rx) - Part 3 - Naming Conventions","url":"https://rehansaeed.com/reactive-extensions-part3-naming-conventions/","breadcrumb":{"@id":"https://rehansaeed.com/reactive-extensions-part3-naming-conventions/#breadcrumb"},"isPartOf":{"@id":"https://rehansaeed.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://rehansaeed.com/reactive-extensions-part3-naming-conventions/"]}]},{"@id":"https://rehansaeed.com/#identity","@type":"Person","name":"Muhammad Rehan Saeed","url":"https://rehansaeed.com/about/","image":{"@id":"https://rehansaeed.com/#/schema/image/1"},"sameAs":["https://github.com/RehanSaeed","https://www.linkedin.com/in/muhammad-rehan-saeed","https://stackoverflow.com/users/1212017/muhammad-rehan-saeed","https://www.youtube.com/c/MuhammadRehanSaeed","https://www.twitch.tv/rehansaeeduk"]},{"@id":"https://rehansaeed.com/#publisher","@type":"Organization","logo":"https://rehansaeed.com/images/schema/Publisher-600x60.png","name":"Muhammad Rehan Saeed","url":"https://rehansaeed.com"},{"@id":"https://rehansaeed.com/reactive-extensions-part3-naming-conventions/#article","@type":"Article","dateModified":"2014-02-14T00:00:00+00:00","datePublished":"2014-02-14T00:00:00+00:00","description":"Reactive Extensions (Rx) Advantages of using IObservable property naming conventions and comparison between C# events.","headline":"Reactive Extensions (Rx) - Part 3 - Naming Conventions","inLanguage":"en-GB","url":"https://rehansaeed.com/reactive-extensions-part3-naming-conventions/","author":{"@id":"https://rehansaeed.com/#identity"},"image":[{"@type":"ImageObject","url":"https://rehansaeed.com/images/hero/Reactive-Extensions-1366x768.png","caption":"Reactive Extensions","width":"1366","height":"768"}],"isPartOf":{"@id":"https://rehansaeed.com/reactive-extensions-part3-naming-conventions/#webpage"},"keywords":[".NET","C#","Events","Naming Convention","Reactive Extensions","Rx","Standards"],"mainEntityOfPage":{"@id":"https://rehansaeed.com/reactive-extensions-part3-naming-conventions/#webpage"},"publisher":{"@id":"https://rehansaeed.com/#publisher"}},{"@id":"https://rehansaeed.com/reactive-extensions-part3-naming-conventions/#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Blog","item":"https://rehansaeed.com/","position":1},{"@type":"ListItem","name":"Reactive Extensions (Rx) - Part 3 - Naming Conventions","item":"https://rehansaeed.com/reactive-extensions-part3-naming-conventions/","position":2}]},{"@id":"https://rehansaeed.com/#/schema/image/1","@type":"ImageObject","contentUrl":"https://rehansaeed.com/images/author/Muhammad-Rehan-Saeed/Logo-512x512.png","inLanguage":"en-GB","url":"https://rehansaeed.com/images/author/Muhammad-Rehan-Saeed/Logo-512x512.png"}]}
```

## Sitemap

See the full [sitemap](https://rehansaeed.com/sitemap.md) for all pages.
