Table of Contents

Method CreateFromText

Namespace
LMKit.Data
Assembly
LM-Kit.NET.dll

CreateFromText(string, string)

Creates a new Attachment from a plain-text string.

public static Attachment CreateFromText(string text, string name)

Parameters

text string

The textual content to encode using UTF-8.

name string

The file name to associate with the content (for example, ending with .txt).

Returns

Attachment

An Attachment carrying the provided text content.

Exceptions

ArgumentNullException

Thrown if text or name is null.