Thursday 29 June 2017

c sharp lesson-5


VARIABLE:
A variable basically denotes a memory space to store data required by an appliocation.A variable is usually declared by mentiong its data type and floowed by its name.

Syntax:

<data_type><variable name>[=initial value];

<data_type> is one of the data type supported by c sharp.<variable name> can be any valid name follows the rule of naming variable rules in c#.




Integral Types.

sbyte
byte
short
ushort
int
uint
long
ulong
char





Bool type:

A bool type variable can take one of the two boolean values true or false.

Floating point types.

Float and double are two floating point types in c#. double takes eight bytes of memory and it is accurate than float type variable because it takes only four bytes.

Decimal.

It is data type used to store very very accurate data in c#. it takes 16 bytes of memory.

---------Muthu karthikeyan,Madurai

HTML-5 Lesson-1



What is HTML?


HTML is a markup language
HTML  stands for Hyper Text Markup Language
It is used to describe the simplest form of web pages.
It is about how two computer speaks to each other over the internet websites.
Before learning html you have to understand what is client and what is server

Client

It is used by a person surfing the net such as computer you are looking at now. from the client side browsers reads and interprets a HTML documents

Server

A server stores and distributes websites over the net. There are several type of servers such as data server, file server.

Main purpose of HTML

HTML is used for content of a web page available to the client i.e browsers.
It also informs the browser that what type of content we‘ve put on the server.
Recent version of HTML is HTML-5
HTML-5 has lot of new features such as <header>, <footer>, <audio>, <video>, <canvas> etc.

Advantages of HTML-5.

1.Easy to interact.
2.supports audio and video files.
3.you can draw on a HTML-5 file using <canvas> element.
4.provides better forms
5. certain concepts previously what we had done with the use of java script is now you can directly do with HTML-5.





Note:
Every thing you learned in Html up to its version HTML-4 is still valid for HTML -5.









HTML-5 Example.

<!DOCTYPE html>
<html>
<body>
<h1> My first Heading </h1>
<P> this is first line</p>

</body>
</html>

Output:



HTML elements.

1.HTML is constructed of elements
2.Elements are used to do markup 

Example

<p> paragraph content </p>

In the above example ,content is put between <p> and </p> elements.
<p> and </p> are called tags.

Every tag consists of a <, followed by an abbreviation , and a >.

Combined with starting tag and closing tag make a element(for example <P> and </p>

The text between opening tag and closing tag is content.

Empty elements.

Empty elements have no closing tag and content.

Example

<br/>

The above tag <br/> is a empty tag and it also called as self closing tags.
The above tag is used for new line insert.




Note:
HTML is not case sensitive.


Wednesday 28 June 2017

csharp lesson-4



                                                                           Muthu karthikeyan,Madurai
Basic structure of c sharp program.


using System;



    class Welcome

    {

        static void Main(string[] args)

        {

            Console.WriteLine("hai suresh");          



        }

    }





First line System is a namespace. it contains library class which contain codings to be executed . here understand that namespace is collection of classes..


Next we declared the class named welciome.in c# every thing must be(method,interfacr,properties etc) inside the class like java.



Next we have Main() method . it is a method which be first executed  on starting of the program. Note one thing unlike c,c++,java which have small m in main here we have capital M Main.


Console is a library class which contains methods to get input and write output. Here we used WriteLine method to print output.


if we removed the firstline
using System;




then the coding to print the output will be

     System.Console.WriteLine("hai suresh");          



it will be good until you used only one use of Console class. But if you have multiple lines of code using Console class Then using System declaration will be good.


Next one interactive program.


using System;



namespace ConsoleApplication2

{

    class Program

    {

        static void Main(string[] args)

        {



            Console.WriteLine("enter your tamil mark");

            String mark = Console.ReadLine();

            int Tmark = Int32.Parse(mark);

            Console.WriteLine("Tamil mark=" +Tmark);







        }

    }

}



mark is the variable which will be of string typewe have to convert it into int by using

Int32.Parse.


printing output by WriteLine may also be done by using place holders.

for example

Console.WriteLine("tamil mark={0}",Tmark);


if you have 2 outputs then

Console.WriteLine("tamil mark={0}, English mark={1}”,Tmark,Emark);


The place holders like {0},{1} will be replaced by the data contained by the variables in Tmark, Emrk etc



                                                                    to be continued

c# introduction-3


What is c#?
C#-pronounced as c sharp-is specially created for Dot net.
It is an object oriented language.
It is a modern language
It is easy to learn
It is  based on c,c++ languages.
It produces Efficient program
It contains simplicity of vb, powerful of c++, and elegance of java.


What is.NET?

After the invention of internet java was introduced to create web oriented applications. Java was also a successful one. There is no web language for  Microsoft. Then it  introduced web concepts in vb6. It was a failure. So Microsoft introduced dot-net.
Java creators tell like this
“write once in java and run anywhere”
It means java is a portable language. If you write a java program you can run it on any platform with out change. But you can write in any language in dot-net. Yes ,dot-net supports many languages such as c#,vb,c++ and COBOL.
You can write any language in dot-net. First they are compiled and changed in MSIL(Microsoft intermediate language. Then jit compiler runs the il.the il is not like Microsoft java’s class file. You can not read java’s class files. But MSIL  is a separate language. There are even books for MSIL.

Which languages are supported by .NET?
C#
C++
Visual basic
Jscript
And it also supports third party languages like
Cobol
Eiffel
Perl
Phython
Small talk
Mercury.

1.       Simple
2.       Speed
3.       Contains a lot of library classes. Common to all languages.
4.       Installation is easy
5.       Low exceptions. 


 what type of applications can be created using .NET?


.NET can be used to creating different type of application. Also a .NET solution can consists of projects written in different languages. For example a vb.net project  can contain a data access component written in c#. This is possible because of inter operability of .NET between projects.

What are Console applications?


Console applications means graphics less applications. Only character will be present. The following statement is the entry point of console applications.
Public static void Main(String args)
The project uses Read,ReadLine, Write,WriteLine methods present in the system.console class.


 what are windows applications?

Example for windows application is ms-word. Normally it contain graphics as icon. We may run any commands by just clicking on the icon..Net can be used for creating such applications.
what are windows controls ?
A windows controls can be created using base controls in toolbox. If you have studied active x control creating using vb6 or vc++ it will be very useful to start learning on creating windows controls in .net.
what are web projects?
Web sites can be created using asp.net the server side asp.net engine will convert the asp.net codes in to pure HTML codes. The browser will execute the HTML code and display  website.Asp.net is used to create interactive, dynamic web sites.
what are Web services
The web services provide information to other web sites. For examples a website can get information such as climate, business news from web services. The main aim of the .Net is providing the software as services.



C# and dot-net.
 C# is a language invented specially  for dot-net. Dot-net developers always choose c# language for their programs. C# 4.0 is the recent version c#