Blog Posts

Recent posts

C# - EF lifetime of DBContext

less than 1 minute read

The following article has a useful information on handling the lifetime of DBContext in EF. http://mehdi.me/ambient-dbcontext-in-ef6/

Java - exceptions

less than 1 minute read

Java has 3 different types of exceptions. 1. Checked exception - Use this exception for a case which can be recoverable. 2. Runtime exception - Use this exce...

Java - illegal generic array

less than 1 minute read

The following code will have a compile error 1 new List<E>[]; The reason is that it is not a typesafe. It will violate the generic type system in Java

C++11- enum class with underlying type

less than 1 minute read

C++11 allows us to specify the underlying type for enum class as shown below. If specified value is not in the range of the underlying type, compiler can cat...