Click here to Skip to main content
15,664,081 members

Comments by George Swan (Top 200 by date)

George Swan 23-Apr-23 2:27am View    
Static classes are useful when you need a singleton instance but in this case many instances are created. I do not think you can have instance members in a static class which means the instance constructor would not be allowed. Also, the trend these days is to use interfaces as it makes the code more versatile but static classes cannot implement an interface. So, for these reasons, I would use a non-static instance.
George Swan 23-Apr-23 1:38am View    
This is my go to reference for SQL Server connection problems
https://social.technet.microsoft.com/wiki/contents/articles/2102.sql-server-troubleshooting-database-engine-connection-issues.aspx
George Swan 18-Apr-23 3:37am View    
Have you tried searching for: C# List paging?
George Swan 13-Apr-23 3:37am View    
Mike, should that not be
MatchCollection m = Regex.Matches(input, pattern, RegexOptions.IgnoreCase);
George Swan 7-Apr-23 13:01pm View    
Should not that be DateTime compareDate = DateTime.Now - TimeSpan.FromDays(6 * 30.5);?