Sunday, December 25, 2016

c# find number of occurance of substring in string

Regex.Matches(inputstring, substring).Count

Monday, December 12, 2016

.net mvc code first database migration configuration seed method error debugging

add the following code into the constructor of the method Configuration:

if (System.Diagnostics.Debugger.IsAttached == false)
            {
               System.Diagnostics.Debugger.Launch();
            }