var message = new SendGridMessage(); message.SetFrom("[email protected]"); message.AddTo("[email protected]"); message.SetSubject("Hello {{name}}!"); message.AddSubstitution("{{name}}", "John Doe");In the above code, we create a new SendGridMessage object, set the sender's email address, the recipient's email address, and the subject line. We then use the AddSubstitution method to replace the {{name}} placeholder in the subject line with the value "John Doe". The example above uses the SendGridMessage package library for C#. This library is available as a NuGet package and can be installed using the Package Manager Console or the Visual Studio Package Manager.