background preloader

VistaIcons.com - Free Vista Style Icons , Vista Wallpapers, Free

VistaIcons.com - Free Vista Style Icons , Vista Wallpapers, Free

Generics in .NET 2.0 Published on ONDotNet.com ( See this if you're having trouble printing code examples by Venkat Subramaniam 06/20/2005 Generics in .NET 2.0 is an exciting feature. But what are generics? Type Safety Many of the languages in .NET, like C#, C++, and VB.NET (with option strict on), are strongly typed languages. However, when it comes to collections in .NET 1.0 and 1.1, there is no help with type safety. Example 1. using System; using System.Collections; namespace TestApp { class Test { [STAThread] static void Main(string[] args) { ArrayList list = new ArrayList(); list.Add(3); list.Add(4); //list.Add(5.0); int total = 0; foreach(int val in list) { total = total + val; } Console.WriteLine( "Total is {0}", total); } } } I am creating an instance of ArrayList and adding 3 and 4 to it. list.Add(5.0); the program will produce a runtime exception: What went wrong? (The above example, if it was written using VB.NET would not fail, however. What Are Generics? Example 2. is not.

Colabora: LINQ + VB .Net Introducción Este ejemplo nos muestra un Formulario de Pedido usando LINQ, por cuestiones de Documentación, es posible que NO ESTE USANDO CORRECTAMENTE todo el potencial de LINQ, asi que espero sugerencias para mejoras, asi mismo debo decirles que hago un abuso de métodos a nivel de formulario las cuales estarían mejor dentro de clases pero creo que para un inicio esto esta bien y cumple con su objetivo. Modelo de Base de Datos Bueno me di la libertad de ponerles el esquema de mi base de datos de pruebas que suelo usar para este tipo de ejemplos. Obviamente los Tipos de Datos funciones y demas, estan dentro del archivo para descargar, asi que no se preocupen, por cierto me olvidaba, estoy usando Ms SQL Server Express. Agregando el Objeto LINQ to SQL A continuación lo que debemos hacer es arrastrar todos Nuestras Tablas de la Base de Datos hacia el Elemento LINQ to SQL, el cual debera quedar de la siguiente forma. Agregando Clase clsDetalleVenta Diseño del Formulario de Busqueda de Clientes

Empezando con LINQ y VB 2008 - Jorge Serrano - MVP Visual Develo Primera pregunta fácil... ¿qué significa LINQ?. Primera respuesta fácil, Language Integrated Queries. Bien,... ya sabemos algo. Segunda pregunta fácil... Tercera pregunta fácil... Cuarta pregunta fácil... Quinta pregunta fácil... Y con todo esto, nos entran unas ganas de probar LINQ que no podemos más... así que siempre y en este punto, aparece una pregunta más... Pues eso es justamente lo que haremos a continuación. LINQ to Object (L2Objects) Iniciaremos un proyecto nuevo en Visual Studio 2008 y en concreto una aplicación Windows utilizando para ello Visual Basic 2008 (Visual Basic 9.0). Dentro de nuestro formulario Windows, insertaremos un control Button. Y finalmente escribiremos el siguiente código de nuestra aplicación: Como podemos observar en este ejemplo, lo primero que hacemos es declarar una matriz y a ella la asignamos un conjunto de valores para a modo de ejemplo poder jugar con ellos. La ejecución de este código nos deberá devolver como salida Febrero y Septiembre. ¿Fácil verdad?.

Article : Editing XML and XML Schema in Visual Studio 2008 - Wro Excerpt from Professional ASP.NET 3.5: in C# and VB Editing XML and XML Schema in Visual Studio 2008 by Scott Hanselman If you start up Visual Studio 2008 and open the Books.xml, which is listing 10-1 from the code download for the book Professional ASP.NET 3.5: in C# and VB (Wrox, 2008, ISBN: 978-0-470-18757-9) file into the editor, you notice immediately that the Visual Studio editor provides syntax highlighting and formats the XML document as a nicely indented tree. If you start writing a new XML element anywhere, you don't have access to IntelliSense. Even though the namespace is the default namespace, Visual Studio 2008 has no way to find the Books.xsd file (listing 10-3 from the code download for the book Professional ASP.NET 3.5: in C# and VB); it could be located anywhere. Classes and methods are used to validate XML documents when you are working programmatically, but the Visual Studio editor needs a hint to find the Book.xsd schema. <? Figure 1 Figure 2

Generating code from code. Free source code and programming help Introduction Some days ago, I read the good CodeProject article "Compiling with CodeDom" by Gustavo Bonansea, where he shows how to use .NET classes from the CodeDom namespace, to compile .NET code programmatically (and, of course, without using the command-line!). As rightly mentioned in the final comments of that article, .NET allows you not only to programmatically compile code, but also to programmatically generate code. Background Imagine to have to implement an arithmetic expression interpreter, that is a piece of code capable to take an expression as an input string and to compute the result of that expression. Another approach consists in generating a function that actually computes that expression. it would be perfect to compute the result simply invoking a function like: Public Shared Function MyMethod() As Single Return 1 + 2 * 3 - 4 / 5 End Function Well, the code of this sample actually does that, in these steps: The Code Some notes Conclusions I was born in 1970.

Compile and Run VB.NET Code using the CodeDom. Free source code Download source- 39.78 KB Not Another "Script Runner" Article! The major differences between this article and others that I have seen presented here are the target audience and the usage scenario. You will notice in the screen shot displayed above that there is not a function declaration. No namespace. These are people who would prefer not to write scripts; no matter how easy it was. Introduction This is a small sample demonstration of late compile. Although the code generation abilities are very interesting and powerful, this article is primarily focused on the ability of the CodeDom assembly to compile dynamic code to an assembly that exists in memory. More than 10 years ago, I wrote a VB6 application that ran VBScript macros. Out With the Old, In With the New... The code presented here is a portion of that solution, upgraded to use the 2.0 Framework. Dim c As VBCodeProvider = New VBCodeProvider Calling the Compiler at Run Time The CompileAndRunCode() Function Dim ep as New cVBEvalProvider

Compile and Run VB.NET Code using the CodeDom. Free source code Download source- 39.78 KB Not Another "Script Runner" Article! The major differences between this article and others that I have seen presented here are the target audience and the usage scenario. You will notice in the screen shot displayed above that there is not a function declaration. These are people who would prefer not to write scripts; no matter how easy it was. Introduction This is a small sample demonstration of late compile. Although the code generation abilities are very interesting and powerful, this article is primarily focused on the ability of the CodeDom assembly to compile dynamic code to an assembly that exists in memory. More than 10 years ago, I wrote a VB6 application that ran VBScript macros. Out With the Old, In With the New... The code presented here is a portion of that solution, upgraded to use the 2.0 Framework. Dim c As VBCodeProvider = New VBCodeProvider Calling the Compiler at Run Time In the case of the code snippet above, the result looks like this:

Adventure Soft Downloads From here you can download the new game drivers for Simon the Sorcerer 1 (Windows 95 or 98). This patch fixes compatibility problems with Windows Me, 2000 and XP. If you have a different problem, see the support pages. Simon the Sorcerer 1 Patch Installation Instructions Be sure to follow the instructions carefully for successful installation of the patch. Note that this patch only works with the latest version of the game (the version that comes with the instruction manual on the CD). 1) Right click on the link at the bottom of these instructions and select ‘Save Target As’. If you have already installed Simon The Sorcerer 1, click here If you can’t install Simon the Sorcerer 1 at all, click here. If you have already installed Simon The Sorcerer 1: 1) Double click the patch to run it when it has downloaded. 2) Follow the on-screen instructions. 3) Click ‘Unzip’ to extract the files, and then click ‘Close’ to exit the patch installer. If you can’t install Simon the Sorcerer 1 at all:

Syntax::Highlight::Engine::Simple::Perl Syntax::Highlight::Engine::Simple::Perl - (EXPERIMENTAL) Perl code highlighting class This document describes Syntax::Highlight::Engine::Simple::Perl version 0.0.1 Constractor use Syntax::Highlight::Engine::Simple::Perl; $highlighter = Syntax::Highlight::Engine::Simple::Perl->new(); or use Syntax::Highlight::Engine::Simple; $highlighter = Syntax::Highlight::Engine::Simple->new(type => 'Perl'); Highlighting stage $highlighter->doStr( str => $str, tab_width => 4); $highlighter->doFile( str => $str, tab_width => 4, encode => 'utf8'); This is a sub class of Syntax::Highlight::Engine::Simple. A working example of This module is at bellow. new type File type. setParams html_escape_code_ref HTML escape code ref. appendSyntax Append syntax by giving a hash. $highlighter->setSyntax( syntax => { class => 'quote', regexp => "'.*?'" doStr Highlighting strings. $highlighter->doStr( str => $str, tab_width => 4 ); str String. tab_width doFile file File name.

Contador de visitas Clasificación de la mano de póker Guía para principiantes Esta lista muestra la clasificación de todas las manos válidas de cinco cartas en póker. También describe como separar dos manos que son igualmente fuertes. Escalera real de color La escalera real de color es un as con una escalera de color alta. Escalera de color Si dos jugadores tienen una escalera de color, gana el que tenga la carta más alta. Cuatro iguales Si hay dos jugadores con un póker, gana el que tenga la side card más alta. Full Si hay dos jugadores con un full, gana el que tenga el trío más alto. Color Si dos jugadores tienen un color, gana el que tenga la carta más alta. Escalera Si dos jugadores tienen la misca escalera, se reparten el bote. Trío Si hay dos jugadores con el mismo trío, gana el que tenga la side card más alta. Dos parejas Si hay dos jugadores con las mismas dos parejas, gana el que tenga la side card más alta. Pareja Si hay dos jugadores con la misma pareja, gana el que tenga la side card más alta. Carta alta Más articulos de Guía para principiantes

Related: