Archive

Archive for the ‘C #’ Category

Neal Gafter comes to Java under the management of Oracle

September 15th, 2011 No comments

The Microsoft employee Neal Gafter, who was the chief designer and implementer of the Java SE 4 and 5 that has brought many improvements to the language and now works for Microsoft on the platform NET Languages, discusses the impact of Oracle acquisition of Sun Java, allows the possibility to add segmented stack and a meta-object protocol for Java, and offers some guidance on the comparison between Java and C # /. NET

Categories: .NET, C #, java Tags: , ,

‘Cosmos’ an operating system based on C #

September 6th, 2011 No comments

There is a new operating system called Cosmos developed entirely in C #. It shows that you can write a kernel of a complete operating system without C. You need Visual Studio to compile and run, and Monkey not supported. However, the source code can be compiled with Visual Studio Express editions, will be supported soon VB.NET

Categories: .NET, C #, sistemaoperativo Tags: , ,

[VIDEO] Learn to program in C #: 3 Lesson – WinForms

February 6th, 2011 2 comments

After days in which I have had a tremendous decline of voice and therefore unable to make my lessons for my classes, Today I take the lessons of the course in C #.

In this lesson we will continue to analyze the graphic objects available in Visual Studio C # Express 2010 and especially the WinForms.

As always for a better view I suggest you watch the video full screen by clicking on the button with youtube 4 arrows.

Read more…

[VIDEO] Learn to program in C #: 2 Lesson – Hello World

January 17th, 2011 2 comments

Continue the course learning to program in C # with the second lesson we create a small program that displays the message Windows Forms Hello World classic first hurdle when learning a new programming language. Read on if you want to watch the video of the lesson:

Read more…

[Video] Learn to program in C #: 1 Lesson – Getting Started ?

January 9th, 2011 2 comments

This screencast is a digital recording of the output screen (As a screenshot is a snapshot of the user's monitor, the screencast is a set of frames, recorded in a video, what the user sees on their monitor…Source: WikiPedia) start the course to learn programming in C #.

Publish each new lesson in midweek (I went along with this lesson because I had no technical problems of video editing and an intestinal virus that has knocked me) which face it step by step all the stages for learning to program in Visual Studio C #. After the jump you'll find Video / screencast of the first lesson.

Read more…

LINQ to SQL: Draw objects in C #, before creating the DB

December 27th, 2010 No comments

I'm not saying you should delete the database from the planning documents for designing a new application. Not at all. The database design is an important part of the development process and should never be overlooked, if necessary. At the same time, sometimes it is easier to begin the design process in another way – the least common.

From my experience, in designing a database from the beginning gives a rather rigid structure. After defining the tables and created some stored procedures, developers start working on their applications trying to adapt the application to existing conditions of the DB and often they must reach compromises because a small change to a table in DB can ruin an entire chain of relationships between tables.

Read more…

Visual Studio.NET and C #: how to handle exceptions and the line number of error

November 28th, 2010 No comments

The exception-handling features of C # allow you to handle unexpected or exceptional situations that occur during the execution of a program. In exception handling uses the try keyword, catch, and finally groped for performing actions that may fail, to handle errors and clean up after the resources. Exceptions can be generated by the common language runtime (CLR), from third-party libraries or application code using the throw keyword.

In this example, a method checks for division by zero error and notes. Without exception handling, the program would be terminated with an error like the following: DivideByZeroException was not handled.

int DivisioneSicura(int x, int)
{
    try
    {
        return (x / and);
    }
    catch (System.DivideByZeroException dbz)
    {
        System.Console.WriteLine("Warning division by zero!!!");

        // Print the error message System.Console.WriteLine(dbz.Message);

        // Print the line number of the source where the error is System.Console.WriteLine(dbz.StackTrace);

        return 0;
    }
}
return

Overview exceptions

The exceptions have the following properties:

  • When an exceptional circumstance occurs in the, such a division by zero or a problem of memory, is thrown.
  • Use a try block around the statements that might throw exceptions.
  • When an exception occurs inside the try block, the flow of control passes immediately to an exception handler associated, is present.
  • If for any exception handlers are not present, program execution will stop with an error message.
  • If an exception catch block defines a variable, You can use it to gain more information about the type of exception that occurred.
  • The actions that can throw a run with the try keyword.
  • An exception handler is a block of code that is executed when an exception occurs. For the definition of an exception handler, C # uses the catch keyword.
  • Exceptions can be generated explicitly by a program using the throw keyword.
  • The exception objects contain detailed information about, including the state of the call stack and a description of, then use to print the description of the education System.Console.WriteLine(dbz.Message); Finally, to print the line number where the error is System.Console.WriteLine(dbz.StackTrace);

Source: msdn.microsoft.com

Categories: C #, visualstudio Tags: ,