Errors and transactions traces can include parameters, yes. You will need to use the .NET API. Instructions for implementing the API can be found here:
https://docs.newrelic.com/docs/dotnet/net-agent-api
One of the following two methods is used for this:
AddCustomParameter(System.String,System.IConvertible) - For numerical values AddCustomParameter(System.String,System.String) - For string values
Further details are included in the page by clicking the down-arrow to the right of each method.