<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>C# Tips</title>
<link>http://csharp.tips</link>
<description>C# Tips and C# Quizzes</description>
<item>
<title>How to use Decimal data type in Entity Framework (EF and EFCore)</title>
<link>/tip/article/1001-How-to-use-Decimal-data-type-in-Entity-Framework-EF-and-EFCore</link>
<guid>/tip/article/1001-How-to-use-Decimal-data-type-in-Entity-Framework-EF-and-EFCore</guid>
<pubDate>Wed, 29 Sep 2021 11:04:46 GMT</pubDate>
<description><![CDATA[ In Entity Framework, "decimal" has 0 in its scale by default.
	For example, if you save 0.414213 onto deciaml column (of table) in C#,
	it will truncate .414213 and store only 0 onto the column in D... ]]></description>
</item>
<item>
<title>Unix timestamp conversion built in .NET</title>
<link>/tip/article/1000-Unix-timestamp-conversion-built-in--NET</link>
<guid>/tip/article/1000-Unix-timestamp-conversion-built-in--NET</guid>
<pubDate>Sat, 21 Aug 2021 05:29:49 GMT</pubDate>
<description><![CDATA[ In my previous post How to get unix timestamp in C#, I explained how to use unix timestamp in C#.
	From .NET 4.6, unix timestamp conversion feature is now built-in. This feature supports unix timesta... ]]></description>
</item>
<item>
<title>System.Text.Json - Why does Deserialize() return empty values?</title>
<link>/tip/article/999-System-Text-Json---Why-does-Deserialize-return-empty-values-</link>
<guid>/tip/article/999-System-Text-Json---Why-does-Deserialize-return-empty-values-</guid>
<pubDate>Sat, 07 Aug 2021 05:37:38 GMT</pubDate>
<description><![CDATA[ .NET Core 3.0 introduced System.Text.Json namespace which includes some of JSON classes. Among the classes, JsonSerializer is probably mostly used for JSON Serialization and Deserialization.

	When ... ]]></description>
</item>
<item>
<title>EF Core 3 Use appsettings.json instead of hardcoded connection string</title>
<link>/tip/article/998-EF-Core-3-Use-appsettings-json-instead-of-hardcoded-connection-string</link>
<guid>/tip/article/998-EF-Core-3-Use-appsettings-json-instead-of-hardcoded-connection-string</guid>
<pubDate>Sun, 26 Apr 2020 11:59:30 GMT</pubDate>
<description><![CDATA[ How do I avoid hardcoded connection string in my DbContext class?

using Microsoft.EntityFrameworkCore;

public class TestDbContext : DbContext
{
  protected override void OnConfiguring(DbContex... ]]></description>
</item>
<item>
<title>EF Core 3 Stored Procedure Example</title>
<link>/tip/article/997-EF-Core-3-Stored-Procedure-Example</link>
<guid>/tip/article/997-EF-Core-3-Stored-Procedure-Example</guid>
<pubDate>Sun, 26 Apr 2020 04:04:42 GMT</pubDate>
<description><![CDATA[ Here is a simple example that shows how to use stored procedure in Entity
  Framework Core 3.x.


// using Microsoft.Data.SqlClient;

var paramList = new[] {
	new Microsoft.Data.SqlClient.SqlPa... ]]></description>
</item>
<item>
<title>Ad hoc logging in ASP.NET</title>
<link>/tip/article/996-Ad-hoc-logging-in-ASP-NET</link>
<guid>/tip/article/996-Ad-hoc-logging-in-ASP-NET</guid>
<pubDate>Sat, 18 Apr 2020 01:04:02 GMT</pubDate>
<description><![CDATA[ I needed to add quick and dirty ad hoc log to staging/test web server. For
  quick ad hoc logging, I felt like DB logging or Windows Event logging was a
  little heavy. So I went for text file loggi... ]]></description>
</item>
<item>
<title>SQL: Select Column When No Row Found</title>
<link>/tip/article/995-SQL--Select-Column-When-No-Row-Found</link>
<guid>/tip/article/995-SQL--Select-Column-When-No-Row-Found</guid>
<pubDate>Fri, 06 Mar 2020 03:54:50 GMT</pubDate>
<description><![CDATA[ This is not C# topic, but you might be interested since it is pretty tricky case.


	In T-SQL, when one selects a column value and assigns to local variable,
	if WHERE condition of the query has n... ]]></description>
</item>
<item>
<title>Using Application-specific Settings</title>
<link>/tip/article/994-Using-Application-specific-Settings</link>
<guid>/tip/article/994-Using-Application-specific-Settings</guid>
<pubDate>Fri, 10 Jan 2020 01:58:26 GMT</pubDate>
<description><![CDATA[ Application Settings allows you to store and retrieve property settings and other information for your application
	dynamically. Settings page can be accessed by choosing Project Properties -&gt; Set... ]]></description>
</item>
<item>
<title>When Control.Invoke() is called before window handle is created</title>
<link>/tip/article/993-When-Control-Invoke-is-called-before-window-handle-is-created</link>
<guid>/tip/article/993-When-Control-Invoke-is-called-before-window-handle-is-created</guid>
<pubDate>Thu, 12 Dec 2019 07:52:21 GMT</pubDate>
<description><![CDATA[ Problem

	One of my blog readers asked why he was unable to call Control.Invoke() in Form constuctor. Calling Invoke() method in Form constructor (or after form is closed/disposed) causes an error &... ]]></description>
</item>
<item>
<title>VS 2017 - The current .NET SDK does not support targeting .NET Core 2.1</title>
<link>/tip/article/992-VS-2017---The-current--NET-SDK-does-not-support-targeting--NET-Core-2-1</link>
<guid>/tip/article/992-VS-2017---The-current--NET-SDK-does-not-support-targeting--NET-Core-2-1</guid>
<pubDate>Sat, 03 Aug 2019 03:04:24 GMT</pubDate>
<description><![CDATA[ Problem

	I downloaded an ASP.NET Core 2.1 project. When I opened the project with VS 2017 v15.0, I ran into the following error.
	&quot;The current .NET SDK does not support targeting .NET Core 2.... ]]></description>
</item>
<item>
<title>VS 2017 - Project file is incomplete. Expected imports are missing</title>
<link>/tip/article/991-VS-2017---Project-file-is-incomplete--Expected-imports-are-missing</link>
<guid>/tip/article/991-VS-2017---Project-file-is-incomplete--Expected-imports-are-missing</guid>
<pubDate>Sun, 28 Jul 2019 05:45:23 GMT</pubDate>
<description><![CDATA[ Problem

	I created new ASP.NET Core 2.1 project in VS 2017. Project build was successful on the machine. I checked the source code into git server and then git-cloned the source code in another mac... ]]></description>
</item>
<item>
<title>How to get the current date and time from internet?</title>
<link>/tip/article/990-How-to-get-the-current-date-and-time-from-internet-</link>
<guid>/tip/article/990-How-to-get-the-current-date-and-time-from-internet-</guid>
<pubDate>Tue, 30 Apr 2019 12:01:40 GMT</pubDate>
<description><![CDATA[ Problem

	How to get the current date and time from internet?

	Solution

	There are two common solutions:
	(1) Use NTP (Network Time Protocol) server

// #1 Use NTP
var tcp = new TcpClient(... ]]></description>
</item>
<item>
<title>How to fix "Could not load assembly System.Data.SQLite.dll"</title>
<link>/tip/article/989-How-to-fix-%22Could-not-load-assembly-System-Data-SQLite-dll%22</link>
<guid>/tip/article/989-How-to-fix-%22Could-not-load-assembly-System-Data-SQLite-dll%22</guid>
<pubDate>Sat, 02 Mar 2019 06:42:49 GMT</pubDate>
<description><![CDATA[ Problem

When I copy a working C# application to another machine, I ran into the following error.

"Could not load assembly System.Data.SQLite.dll or one of its dependencies."

The C# applicatio... ]]></description>
</item>
<item>
<title>How to download DataTable in Excel format</title>
<link>/tip/article/988-How-to-download-DataTable-in-Excel-format</link>
<guid>/tip/article/988-How-to-download-DataTable-in-Excel-format</guid>
<pubDate>Tue, 04 Dec 2018 10:10:00 GMT</pubDate>
<description><![CDATA[ Problem

	How to download tabular data such as DataTable data in Excel CSV/TSV format.

	Solution

	To add tabulardata download feature in a web page,
	(1) Create CSV or TSV content from tabula... ]]></description>
</item>
<item>
<title>How to scroll a panel using mouse wheel</title>
<link>/tip/article/987-How-to-scroll-a-panel-using-mouse-wheel</link>
<guid>/tip/article/987-How-to-scroll-a-panel-using-mouse-wheel</guid>
<pubDate>Sat, 24 Nov 2018 12:49:05 GMT</pubDate>
<description><![CDATA[ Problem

	How can we scroll a panel using mouse wheel in WinForms?

	Solution

	Set panel&#39;s AutoScroll property to true and set the panel to have focus. Panel does not have focus and it need... ]]></description>
</item>
<item>
<title>How to check potential XSS characters</title>
<link>/tip/article/986-How-to-check-potential-XSS-characters</link>
<guid>/tip/article/986-How-to-check-potential-XSS-characters</guid>
<pubDate>Thu, 08 Nov 2018 11:24:40 GMT</pubDate>
<description><![CDATA[ Problem

	How to check if query string in URL contains potential XSS characters?
	
Solution

	Query string in URL can contain potential XSS characters such as &lt;, &gt;.
	For example, the foll... ]]></description>
</item>
<item>
<title>NumericUpDown control in WPF DataGrid</title>
<link>/tip/article/983-NumericUpDown-control-in-WPF-DataGrid</link>
<guid>/tip/article/983-NumericUpDown-control-in-WPF-DataGrid</guid>
<pubDate>Tue, 19 Jun 2018 10:08:46 GMT</pubDate>
<description><![CDATA[ Problem

	How to add NumericUpDown control in WPF DataGrid?
	
How to use

	One way of adding NumericUpDown feature in WPF DataGrid is to use Extended WPF Toolkit.
	Extended WPF Toolkit provides... ]]></description>
</item>
<item>
<title>VS Server Explorer Error - Login Failed for user</title>
<link>/tip/article/982-VS-Server-Explorer-Error---Login-Failed-for-user</link>
<guid>/tip/article/982-VS-Server-Explorer-Error---Login-Failed-for-user</guid>
<pubDate>Thu, 24 May 2018 09:37:49 GMT</pubDate>
<description><![CDATA[ Problem

	When expanding [Tables] node of SQL Server from [Server Explorer] in Visual Studio 2017, the following error might occur. This error occurs when connecting to SQL Server with SQL Authentic... ]]></description>
</item>
<item>
<title>CLR version vs .NET version</title>
<link>/tip/article/981-CLR-version-vs--NET-version</link>
<guid>/tip/article/981-CLR-version-vs--NET-version</guid>
<pubDate>Thu, 08 Mar 2018 11:46:43 GMT</pubDate>
<description><![CDATA[ CLR version vs .NET version


CLR version and .NET version are different and sometimes little confusing.
There are several ways of checking CLR and/or .NET version.


1) Using clrver.exe

Ope... ]]></description>
</item>
<item>
<title>Error 0x80004005 when starting ASP.NET .NET Core 2.0 WebApp in IIS</title>
<link>/tip/article/980-Error-0x80004005-when-starting-ASP-NET--NET-Core-2-0-WebApp-in-IIS</link>
<guid>/tip/article/980-Error-0x80004005-when-starting-ASP-NET--NET-Core-2-0-WebApp-in-IIS</guid>
<pubDate>Sat, 03 Feb 2018 12:49:16 GMT</pubDate>
<description><![CDATA[ Problem

When ASP.NET/.NET Core 2.0 web application is deployed to IIS Server, the web app might fail to start with the following error.



    physical root '' failed to start process with comm... ]]></description>
</item>
</channel>
</rss>
