browse by category or date

This is a part of series on my quest to devour this book and share any interesting things that I didn’t know before:

This book is currently only available at Amazon. Singapore’s National Library only have its previous edition:

So C# 7.0 introduces new syntax sugar in if-else statement. Say we receive an object as a parameter for arithmetic operation. To prevent runtime error, we need to ensure that the parameter is an integer. The old way of doing this would be:

public static int someArithmeticOp(object o) {
    try {
        var i = (int) o;		
        // ..
        // .. do the arithmetic ops here 
        //..
    }
    catch (Exception ex) {
        throw;
    }		
}

With C# 7.0, we can do this:

public static int someArithmeticOp(object o) {    
    if (o is int i) {		
        // ..
        // .. do the arithmetic ops here 
        //..
    }
    else {
        // o is not integer, you can throw Exception, or doing other useful steps
        throw new Exception("Invalid parameter");
    }		
}

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant:

Update on which clinics to go for treatment:

[Sent by Gov.sg – 18 Feb]

Public Health Preparedness Clinics (PHPC) provide subsidised treatments for patients with respiratory symptoms.

When should I go to a PHPC?
When you have mild flu-like symptoms eg fever, cough, sore throat and runny nose.

Where are the PHPC clinics are?
Go to phpc.gov.sg to find a PHPC clinic close to you. You can also go to polyclinics.

How much will I have to pay?
S’pore citizens and PRs pay $10. Pioneer and Merdeka Generation seniors pay $5.

What if the doctor suspects COVID-19?
If you have pneumonia, you will be sent to hospital. Otherwise, you will receive a 5-day MC. Stay home.

What if I’m not feeling better after 5 days?
Return to the same clinic for further checks. Don’t doctor-hop.

Find a nearby clinic: phpc.gov.sg
More info: go.gov.sg/govsg-phpc

Update on number of confirmed cases:

[Sent by Gov.sg]

COVID-19: 18 Feb Update

As of 12pm:
New cases: 4
Discharged today: 5
Total confirmed cases: 81
Total discharged: 29

Most in hospital are stable or improving. 4 remain in ICU.

All 4 new cases have links to previous cases.

More: Go.gov.sg/moh18feb

Supporting Singaporeans impacted by COVID-19

Care and Support Package
– $100 to $300 one-off cash payouts for adult S’poreans; $100 more for those with at least one S’porean child
– U-Save rebates doubled; more for households of 5 and more
– S&CC rebates extended
– Workfare increased and grocery vouchers for lower-income go.gov.sg/care-support

Businesses and workers will benefit from a Stabilisation and Support Package: go.gov.sg/stabilisation-support

Stay safe everyone!

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant:

Guides on maintaining hygiene during this crisis:

[Sent by Gov.sg – 17 Feb]

SG Clean
– COVID-19 is transmitted primarily through droplets. To fight this outbreak, we need to look after our personal hygiene, AND keep Singapore clean.
– A clean environment will help stop community transmission of COVID-19

7 good habits
1. Keep premises clean and pest-free
2. Return trays, keep tables clean
3. Keep toilets clean and dry
4. Wash hands regularly with soap
5. Take temperature, see doctor if unwell, stay home
6. Use tissue when sneezing or coughing
7. Bin litter and soiled tissue

NEA stepping up:
– Inspection of public toilets and other public places
– Enforcement against spitting and littering
– Adoption of SG Clean quality mark, to ensure high level of cleanliness

More on #SGClean: go.gov.sg/sgclean

More hygiene tips: go.gov.sg/getserious

Update on number of confirmed cases in Singapore:

[Sent by Gov.sg]

COVID-19: 17 Feb Update

As of 12pm:
New cases: 2
Discharged today: 5
Total confirmed cases: 77
Total discharged: 24

Most in hospital are stable or improving. 4 remain in ICU – 1 less than yesterday.

Of the 2 new cases, 1 was an evacuee from Wuhan on 9 Feb, the other is linked to a previous case.

More info: go.gov.sg/moh17feb

Stay-Home Notice (SHN)
– All S’pore residents and long-term pass holders returning from Mainland China (outside Hubei) are to stay home at all times for 14 days after returning to S’pore
– There are penalties for non-compliance

For more: Go.gov.sg/StayHomeNotice

Stay safe everyone!

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant: