I want to save a Mime Type in my code. Now I use to do this:
string mYMimeType = "text/plain";
Is there a way to save it in a (already existent) standard,dedicated class? Something like...
Http.MimeTypes myMimeType = Http.MimeTypes.TextPlain;
C programming language is a machine-independent programming language that is mainly used to create many types of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games and is considered a programming foundation in the process of ...
In the real sense it has no meaning or full form. It was developed by Dennis Ritchie and Ken Thompson at AT&T bell Lab. First, they used to call it as B language then later they made some improvement into it and renamed it as C and its superscript as C++ which was invented by Dr. Stroustroupe.
C is a general-purpose language that most programmers learn before moving on to more complex languages. From Unix and Windows to Tic Tac Toe and Photoshop, several of the most commonly used applications today have been built on C. It is easy to learn because: A simple syntax with only 32 keywords.
We write C for Carbon Because in some element the symbol of the element is taken form its first words and Co for Cobalt beacause in some elements the symbol of the element is taken from its first second letters, so that the we don't get confuse.
you can make use of MediaTypeNames
class exists in System.Net.Mime
namesapce.
Below is .net class can help you , you dont have to create it by youself.
namespace System.Net.Mime
{
// Summary:
// Specifies the media type information for an e-mail message attachment.
public static class MediaTypeNames
{
// Summary:
// Specifies the kind of application data in an e-mail message attachment.
public static class Application
{
// Summary:
// Specifies that the System.Net.Mime.MediaTypeNames.Application data is not
// interpreted.
public const string Octet = "application/octet-stream";
//
// Summary:
// Specifies that the System.Net.Mime.MediaTypeNames.Application data is in
// Portable Document Format (PDF).
public const string Pdf = "application/pdf";
//
// Summary:
// Specifies that the System.Net.Mime.MediaTypeNames.Application data is in
// Rich Text Format (RTF).
public const string Rtf = "application/rtf";
//
// Summary:
// Specifies that the System.Net.Mime.MediaTypeNames.Application data is a SOAP
// document.
public const string Soap = "application/soap+xml";
//
// Summary:
// Specifies that the System.Net.Mime.MediaTypeNames.Application data is compressed.
public const string Zip = "application/zip";
}
// Summary:
// Specifies the type of image data in an e-mail message attachment.
public static class Image
{
// Summary:
// Specifies that the System.Net.Mime.MediaTypeNames.Image data is in Graphics
// Interchange Format (GIF).
public const string Gif = "image/gif";
//
// Summary:
// Specifies that the System.Net.Mime.MediaTypeNames.Image data is in Joint
// Photographic Experts Group (JPEG) format.
public const string Jpeg = "image/jpeg";
//
// Summary:
// Specifies that the System.Net.Mime.MediaTypeNames.Image data is in Tagged
// Image File Format (TIFF).
public const string Tiff = "image/tiff";
}
// Summary:
// Specifies the type of text data in an e-mail message attachment.
public static class Text
{
// Summary:
// Specifies that the System.Net.Mime.MediaTypeNames.Text data is in HTML format.
public const string Html = "text/html";
//
// Summary:
// Specifies that the System.Net.Mime.MediaTypeNames.Text data is in plain text
// format.
public const string Plain = "text/plain";
//
// Summary:
// Specifies that the System.Net.Mime.MediaTypeNames.Text data is in Rich Text
// Format (RTF).
public const string RichText = "text/richtext";
//
// Summary:
// Specifies that the System.Net.Mime.MediaTypeNames.Text data is in XML format.
public const string Xml = "text/xml";
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With