PROPERTY

DbParameter.Value

Stores the bound parameter value. Use DBNull.Value for SQL NULL rather than assuming a C# null reference has the same provider meaning. Select a suitable DbType and size when required. Requires the reviewed Microsoft.Data.Sqlite package.

Formal Syntax & Structure

csharp syntaxcsharp
parameter.Value = (object?)note ?? DBNull.Value;

Working Example

Example Snippetcsharp
using System;using System.Data;using System.Data.Common;using Microsoft.Data.Sqlite;var p=new SqliteParameter("$note",DbType.String); p.Value=DBNull.Value; Console.WriteLine(p.Value==DBNull.Value); // True
C# & .NET Reference