Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts

20 April 2016

How Java is relates to C, C++ & C# programming language

  • Java programming language syntax come from C programming language. 
  • Java language object model is adapted from C++ programming language. 
  • Java also inherits design philosophy from C/C++.
  • Although Java was influenced by C++, it is not an enhanced version of C++
  • Java has many distinct features than C/C++.
  • Microsoft developed the C# (C- Sharp) language after few years of the creation of Java &  C# is closely related to Java.
    Java,C,  C++ & C# programming language
  • Many of C#’s features directly parallel Java. 
  • Both Java and C# share the same general C++-style syntax, support distributed programming, and utilize the same object model. 
  • There are, of course, differences between Java and C#, but the overall “look and feel” of these languages is very similar.

Java All-in-One For Dummies (For Dummies (Computers))

20 March 2014

What are the version of Microsoft .NET Platform


  • According to the targeted user group there are a few versions of .NET platform which is given bellow:
  • .NET Framework
  • .NET  Compact  Framework  (CF)
  •  Silverlight
  • .NET  for  Windows  Store  apps


1# .NET Framework is the most common version of the .NET environment which is used in the development of

Console applications,
Windows applications with a graphical user interface, Web applications and many more.

2#  .NET  Compact  Framework  (CF)  is  a  "light"  version  of  the  standard .NET  Framework. It is used  in  the  development  of  applications  for

Mobile phones and PDA devices using Windows Mobile Edition.

3#  Silverlight is also a "light" version of the .NET Framework. It is used on Web browsers in order to implement multimedia and Rich Internet Applications. It is similar to Adobe Flash.

4# .NET  for  Windows  Store  apps  is  a  subset  of  .NET  Framework designed . It is used to Develop  and  execution  of  .NET  applications  in Windows  8  and  Windows  RT  environment  (windows app store) Pro C 7: With .NET and .NET Core

18 February 2014

What is the difference between static and not static method in OOP

  • The main difference between static and non static method is Static method does not require an instance where non static method requires an instance to access them.
  • Example code in C#


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
class Calculator 
{
  //Static method 

  public static int sum(int a, int b)
   {
     return a + b;
   }
  //Non-Static methods

  public int subtract(int a, int b)
  {
     return a - b;
  } 

  public int Multilpy(int a, int b)
  {
    return a * b;
  }

  public int division(int a, int b)
  {
    return a / b;
  }
}


  • The sum method is declared as static, we can access the sum method without creating an instance of the Calculator class Code:


1
2
3
4
5
6
int firstNumber =int.Parse(textBox1.Text);
int secondNumber = int.Parse(textBox2.Text);

int sum = Calculator.sum(firstNumber, secondNumber);

MessageBox.Show("Result form Static Method sum="+sum);


  • Here,Method subtract is declared without the static keyword , that’s why is will act as non static, so if we want to access the subtract method of calculator class, then we have to create an instance of the calculator class first, then all the non-static methods will be accessible using the instance (i.e result1, result2) Code:


1
2
3
Calculator result1 = new Calculator(); 

MessageBox.Show("Result form Non Static Method subtraction= " + result1.subtract(firstNumber, secondNumber));

C 6.0 and the .NET 4.6 Framework

04 February 2014

Write your first "Hello World" Program in Visual C#


If you are new to C# programming language, then this blog post will help you to write your first C# program. I used "Microsoft Visual Studio 2010" to write this first "Hello World" program.

So,Installed the "Microsoft Visual Studio" on your PC and follow the step by step instruction given bellow:

Step 1: Start Visual Studio 2010

Start Visual Studio 2010
Start Visual Studio 2010

Step 2:. Click on New Project or Ctrl+Shift+N to create new project


Step 3: Click on Console Application. You may change the Name, Location and Solution Name

C# Console application
C# Console application


Step 4: Write the code inside the main function.

   Console.WriteLine("Hello World ! My first C# program.");

Hello World programming code in C#
Hello World programming code in C#

Step 5:. You first C# program is done.

Step 6:. Now run to program to see the output.
Click Debug ->Start without debugging or press ctrl+F5

Step 7:. The result will be show on a dos screen:

C# Hello World programming  output
C# Hello World programming  output

Step 8:. Enjoy programming with C#. Now you may write as may text as you want using the C# programming language. Head First C: A Learner's Guide to Real-World Programming with C#, XAML, and .NET

03 October 2013

What are the advantages of using Visual Studio to the .NET DEVELOPER?


  • Visual Studio offers much advantage to the .NET developers, some most highlighted features is given bellow:
Visual Studio to the .NET developers
Visual Studio to the .NET developers
  • Access to software design and code windows is easier than other IDE available on software development.
  • Have WYSIWYG (What You See Is What You Get) visual design support which facilitate Windows and Web Forms development.
  • Visual studio have auto Code completion support, which allows you to enter code with fewer errors and less typing.
  • Immediate flagging of syntax errors, which allows you to fix problems as they are entered.
  • The same code editor can be used for all .NET languages.
  • It has an integrated debugger, which allows you to debug the code for better software development.
  • Visual Studio helps to develop software rapidly and more easily
  • Third-party tools can be integrated into Visual Studio.
  • It has a Server Explorer features which allows you to log on to servers that you have network access to, access the data and services on those servers.
  • It has integrated build and compiles support which makes the programming life easier.
  • It has drag-and-drop controls support onto your web page.
Visual Studio Professional 2017 - PC Download

What types of applications you can build in C#.NET ?

C#.NET language can be used to develop four types of applications, these are:
  1. Console applications
  2. Windows applications
  3. ASP.NET Web applications
  4. Web services
  1. Console applications: A console application runs in a console window (ie.MS DOS) which provides simple text-based output.
  2. Windows applications: A Windows application runs on a computer desktop. Windows applications such as MS-Word and Excel, Calculator, Paint etc are example of windows application.
  3. ASP.NET applications: ASP.NET applications are developed to run on a web server which is accessible through browsers. ASP.NET technology facilitates the budding of web applications quickly and easily. Dynamic websites like http://www.microsoft.com are good example of ASP.NET applications.
    Web services
  4. Web services:Web services are complex applications that can provide services such as current weather update, product stock status, converts the temperature from Fahrenheit to Celsius and many more.
C in Depth

What is a namespace in programming language?


  • A namespace is a framework for their identifiers (class, methods). 
  • Namespace provide a way of grouping the names that are assigned to elements (class, methods) in a software application so that they don’t conflict with other class, methods names. 
  • Namespaces are heavily used in C# & other OOP language & all .NET Framework classes are organized in namespaces, to be used more clearly and to avoid confusion.

C 7.0 in a Nutshell: The Definitive Reference

What is the .NET Framework ?

  • The (dot net) .NET Framework is a software framework developed by Microsoft. It has a huge number of class libraries which provides:
    .NET Framework
  • User interface, which is used to design for software interface,
  • Database connectivity, used to connect with database
  • Cryptography, used to ensure software security,
  • Web application development, 
  • Network communications and many more facilities on software development.
  • C#, VB, J# etc are the programming language used by software developer with the combination of .NET framework to developed software application.

  • The software applications developed with the dot net framework mainly runs on Microsoft Windows OS. 

  • The most important components of the .NET framework are:
  • CLR (Common Language Runtime), which allows us to compile and execute program.
  • FCL (Framework Class Library), which has a large number of predefined types or classes to use in software development.

C 6.0 and the .NET 4.6 Framework

02 October 2013

What do you mean by CLR of Microsoft .NET framework?

  • CLR stands for Common Language Runtime. 
  • CLR is the component of the .NET Framework developed by Microsoft that allows you to compile and execute applications written in any language (i.e C#, VB) with .NET. 
  • CLR provide the following service to the .NET programming environment:
    Microsoft .NET framework

  • Exception Handling
  • Garbage Collection
  • Thread Management
  • Memory Management
  • Type Safety

Featured Post

How to Write PHP code and HTML code within a same file

A PHP file can have both PHP code and HTML code together. Any HTML code written outside of PHP <?php //php code here… ?> Code is ig...

Popular Posts