What are Tokens in programming

Smallest individual element of a program is called as Token. Everything you see inside a program is a token.

For example – Suppose an English sentence. “C language is an awesome language. C was developed by Dennis Ritchie at AT&T Bell labs in 1972.”

The above sentence is made of Alphabets (a-z A-Z), Blank spaces, Digits (0-9) and special characters (full stop in our case). These are building blocks or basic elements of our sentence. Similarly there are various basic programming elements that makes any program.

There are five types of tokens.

  1. Keyword
  2. Identifier
  3. Operator
  4. Separator
  5. Literal

Read more

Sending e-mails with attachment in C#

In previous post we saw how to send e-mails using C# in few simple steps. Here we will see how to add attachments to our messages. Know it: System.Net.Mail.Attachment : Used to attach any file to our MailMessage. GUI form: Implement it: using System; using System.ComponentModel; using System.Net.Mail; using System.Windows.Forms; namespace MailMe { public partial … Read more

Sending emails in C#

C# provides an easy solutions for sending mails in just few steps. Know it: Prior to main code file we first must look onto the classes .NET provides for sending mails and working with smtp protocol. All the mentioned classes are present under System.Net.Mail namespace. SmtpClient : Allows sending of emails using smtp protocol. MailMessage … Read more