26 sept 2008
13 sept 2008
MS patterns & practices: App Arch Guide - Updates (Dic.2002 to Date.Now !)
Architecture and Design
The following diagram represents a common application architecture with components grouped by different areas of concern
Pattern Map
| Area | Relevant Patterns |
|---|---|
| Authentication and Authorization | Direct Authentication |
| Brokered Authentication | |
| Federated Authentication (SSO) | |
| Trusted Sub-System | |
| Caching | Cache Dependency |
| Page Cache | |
| Communication | Pipes and Filters |
| Intercepting Filter | |
| Composition | Composite View |
| Template View | |
| Transform View | |
| Two-step View | |
| Concurrency and Transactions | Coarse Grained Lock |
| Implicit Lock | |
| Optimistic Offline Lock | |
| Pessimistic Offline Lock | |
| Transaction Script | |
| Capture Transaction Details | |
| Configuration Management | Provider |
| Coupling and Cohesion | Adapter |
| Dependency Injection | |
| Data Access | Active Record |
| Data Mapper | |
| Query Object | |
| Repository | |
| Row Data Gateway | |
| Table Data Gateway | |
| Exception Management | Exception Shielding |
| Layering | Entity Translator |
| Façade | |
| Layered Architecture | |
| Service Interface | |
| Service Layer | |
| Logging and Instrumentation | Provider |
| State Management | Context Object |
| Structure | Client/Server |
| N-Tier | |
| Software + Services (S+S) | |
| Software as a Service (SaaS) | |
| Platform as a Service (PaaS) | |
| User Experience | Asynchronous Callback |
| Chain of Responsibility | |
| Validation | Publish/Subscribe |
| _Workflow_ | Data-driven workflow |
| Human workflow | |
| Sequential workflow | |
| State-driven workflow |
- Identify the consumers of your business layer
- Determine how you expose your business layer
- Determine security requirements of your business layer
- Determine your validation requirements and strategy for business layer
- Determine caching strategy for your business layer
- Determine exception management strategy for your business layer
Business Components – When designing the business components following are the key activities that you need to perform.
- Identify different types of business components
- Determine application design considerations
- Identify transactional requirements
- Identify how business rules are handled
- Identify patterns that fit the requirements
Business entities – When designing the business entities following are the key activities that you need to perform.
- Identify common data formats for business entities
- Determine how data will be used in the application
- Choose your approach for managing rules
- Optionally choose your design for custom objects
- Optionally determine serialization support
Approach
- Identify your client type. Choose a client type that satisfies your requirements and adheres to the infrastructure and deployment constraints of your organization.
- Determine how you present data. Choose the data format for your presentation layer and decide how you will present the data in your User Interface (UI).
- Determine your data validation strategy. Use data validation techniques to protect your system from un-trusted input.
- Determine your business logic strategy. Factor your business logic to decouple business logic from presentation layer code.
- Determine your strategy for communication with other layers. If your application has multiple layers, such as a data access layer and a business layer, determine a strategy for communicating from your presentation layer to these other layers.
Design Considerations
Use the following design principles when designing the presentation layer:- Choose the appropriate UI technology. Determine if you will implement a rich client, a web client, or a rich internet application.
- Choose relevant patterns. Review the presentation layer patterns for proven solutions to common presentation problems.
- Design for separation of concerns. Use dedicated UI components to focus on rendering and display. Use dedicated presentation entities to manage the data required to present your views. Use dedicated UI process components to manage user interaction processing.
- Consider human interface guidelines. Review guidelines that have been established for your organization. Review common user interface guidelines based upon the client type and technologies that you have chosen.
- Adhere to user-driven design. Before designing your presentation layer, understand your customer. Use surveys, usability studies and interviews to determine the best presentation design for your customer's needs.
Guidelines Index
J.D. Meier , Alex Homer, Jason Taylor , Prashant Bansode , Lonnie Wall, Rob Boucher, Akshay Bogawat.Guidelines present the "what to do", "why", and "how." They're organized using frames. A frame is simply a collection of hot spot areas to organize the guidance into meaningful buckets.
Architecture and Design
Layers
11 sept 2008
MODELO WIN FORMS TO WEB !!, .NET DESKTOP TO WEB - AND OPEN SOURCES
4 sept 2008
SQLSERVER - Random Number Generator Script
SQL SERVER - Random Number Generator Script - SQL Query
Random Number Generator
There are many methods to generate random number in SQL Server.
Method 1 : Generate Random Numbers (Int) between Rang
---- Create the variables for the random number generationDECLARE@RandomINT;DECLARE@UpperINT;DECLARE@LowerINT---- This will create a random number between 1 and 999SET@Lower=1---- The lowest random numberSET@Upper=999---- The highest random numberSELECT@Random=ROUND(((@Upper-@Lower-1) *RAND() +@Lower),0)SELECT@RandomMethod 2 : Generate Random Float Numbers
SELECTRAND( (DATEPART(mm,GETDATE()) *100000)+ (DATEPART(ss,GETDATE()) *1000)+DATEPART(ms,GETDATE()) )Method 3 : Random Numbers Quick Scripts
---- random float from 0 up to 20 - [0, 20)SELECT20*RAND()-- random float from 10 up to 30 - [10, 30)SELECT10+ (30-10)*RAND()--random integerBETWEEN0AND20-[0, 20]SELECTCONVERT(INT, (20+1)*RAND())----random integerBETWEEN10AND30-[10, 30]SELECT10+CONVERT(INT, (30-10+1)*RAND())Method 4 : Random Numbers (Float, Int) Tables Based with Time
DECLARE@tTABLE(randnum float)DECLARE@cntINT;SET@cnt=0WHILE@cnt<=10000BEGINSET@cnt=@cnt+1INSERT INTO@tSELECTRAND( (DATEPART(mm,GETDATE()) *100000)+ (DATEPART(ss,GETDATE()) *1000)+DATEPART(ms,GETDATE()) )ENDSELECTrandnum,COUNT(*)FROM@tGROUP BYrandnumMethod 5 : Random number on a per row basis
---- The distribution is pretty good however there are the occasional peaks.---- If you want to change the range of values just change the 1000 to the maximum value you want.---- Use this as the source of a report server report and chart the results to see the distributionSELECTrandomNumber,COUNT(1)countOfRandomNumberFROM(SELECTABS(CAST(NEWID()ASbinary(6)) %1000) +1 randomNumberFROMsysobjects)sampleGROUP BYrandomNumberORDER BYrandomNumberAlejandro A Sfrede
Arquitecto de Software
Microsoft Certified Professional
2 sept 2008
http://www.google.com/chrome download & conference
10:53 Good morning, browser battler watchers!
10:54 I'm installed in the front row at the Google press conference.
People are still filing in, hang on while I get everything set up.
10:54 [Image] Chrome Logo View
10:55 Today's topic, Google Chrome.
If you're looking for a live video stream, Google said they'd have
one. Links here:
http://news.cnet.com/8301-17939_109-10030035-2.html?tag=mncol;title
10:55 This blog will be my color commentary of the launch announcement.
10:55 [Comment From CovinaBob]
Good morning. Is this Rafe?
10:56 Yes, it's Rafe.
For everyone else sending me feedback... Wow! Thanks for all the
kinds words, sorry I won't be able to post and reply to most of them.
But I really do appreciate it, and if you have a really good question
I can address, I'll put up your note.
10:57 [Comment From Shen]
When and where to download?
10:58 [Comment From el lobo del mar]
Any word on when Chrome will be ready for downloading?
10:58 I hear 11am pacific.
10:58 We'll see
11:01 [Comment From RJS, Los Angeles, CA]
Hi Rafe, I read your post yesterday in regards to chrome being
available to PC users only at first...any idea when we could expect to
see the chrome make its way over to mac?
11:01 Good Q, I expect that will be a topic discussed here today
11:07 I'm trying to add some photos to the blog here, having some issues.
11:07 Oh well, we're going live now. Brian O'Shaugnassey (sp?) introing now
11:08 Demo will be first "in advance of launch"
Download will be available at NOON PACIFIC
11:08 Up now: Sundar Pichai, VP Prod Mgmt
11:09 How the comic came about: Scott McCloud is "a legend in the
comic world," and has handled complex topics. Scott was "embedded with
the team."
11:09 Why we built chrome....
11:09 (10 min on this, he says, then 30 min of demo)
11:10 Why we built chrome:
Web has evolved from static text to interactive pages (eg Google StreetView)
But "underlying browser architecuture is still very similar to
original Netscape"
11:11 We believe browsers should evolve a lot more to keep pace with
how the Web is evolving.
Sundar says, "I do all my work in a browser."
11:11 What could you do if you built a browser from scratch? That was
the genesis of Chrome
11:12 Google Search informed a lot of Chrome.
Simple, but powerful due to its powerful core
Chrome tried to emulate this: Simple experience but with a lot of
underlying technology
11:12 [Comment From Michel]
can you post the live video stream again please, the link you posted
is redirecting to this page
11:12 "This is Chrome... it has a very simple look"
11:13 Try this link for video stream
http://google.client.shareholder.com/Visitors/event/build2/MediaPresentation.cfm?MediaID=33101&Player=1
11:13 The slide of chrome -- VERY SIMPLE. Just a bunch of tabs and
an address bar.
"We don't interrupt the user at all... the browser should stay out of the way."
11:14 70% of time on browser is spent going back to things you've seen
before... we spent a lot of time on that use case.
11:14 The core...
11:14 Based on Webkit, same as Safari. "We wanted to make sure we
didn't make a headache for developers."
11:15 Why webkit?
It's fast.
It's a simple code base
It was "friendly to a lot of google devs"
And it's also used by Android
11:15 Chrome is multi-process
(this is the same stuff that we heard about in the comic so far)
11:17 Each tab runs as own process.
* browser is more responsive
* crash-resistant (can close a tab indep)
* more secure - tabs are sandboxed
11:17 "The multiprocess architecture is funamental to chrome and we
were able to do it since we rebuilt the browser from scratch"
11:18 Google rewrote javascript code from scratch, calling it V8.
Executes javascript "much much faster" than existing techs
11:18 Most web devs don't use javascript because it's slow. Sundar
thinks that will change thanks to V8
11:19 Chrome will launch today for vista and XP
"We are working very hard on Mac and Linux versions"
11:19 Was designed for multi platform, but we decided to launch Win
ver as soon as it was ready.
"A lot of use inside use Mac and Linux, there's enough internal
pressure" to get it out
11:19 Launching 43 languages, tho.
11:20 Final point:
Chrome is "fully open source, under a very permissive license."
11:20 "We borrowed code from Firefox"
11:20 Why do this?
"As the Web gets better, it has a very serious benefit for google."
"We can write better apps"
11:21 Announcing today:
CHROMIUM, the open source reousrce
11:21 Next up...
DEMO
by Ben Goodger (UI guy)
was at Mozilla... hmm
11:21 [Comment From danser]
Chromium will be at http://code.google.com/p/chromium/ - note the page
is forbidden instead of 404 right now.
11:22 UI coming up now...
11:22 Big focus on tab browsing... "a primary element of the browser"
"Kind of like title bars for web pages and apps"
11:23 "Wanted to make feature scale for heavy usage."
"We think tabs are coolest thing to come to browsers in 10 yrs"
11:23 can grab and drag tabs. "They're very friendly, it's almost like
you want to drag them"
You can drag them off the browser, or back in
11:24 some subtle niceties... ex if you close a tab, the next one over
slides so its close box is right under your mouse.
Editorial comment: Nice!
11:25 Address bar demo:
"Where's the search box??"
Isn't one -- there's just one address bar that doubles as search
Confusing to user since "you had to decide what you were going to do
before you did it."
11:25 They shall call it...
The Omnibox
11:26 "It's a little bit psychic"
They used to call it the "psychic omnibox"
11:26 Ok, let's see it...
It's a lot like the Firefox awesomebar, except the pre-fill is already
in your address bar, so you don't have to click down on a list to
select top result
11:27 If you keep typing, you can enter in URLs or enter search quereies
11:28 You can use other search engines, like Amazon, Wikipedia
Once you use a search box on a site, you then get a "press tab to
search" cue in the omnibox when you begin to type that url again, and
you'll get that site's search function.
This is cool, and smart
11:30 Start page / New Tab page
automatically shows you thumbnails of nice sites you visit most often,
plus list of your most-used search engines, recent bookmakrs you've
made, and recently closed tabs.
More nice features. Looks really useful.
11:31 It's the default home page.
Or if you have one you like, "we import that as well."
You can also choose to open browser with your own set of tabs
Required features, no big deal
11:31 Private browsing mode aka porn mode:
11:32 You don't want to clear out your history and cache, you'll erase
your omnibox history and top tabs.
So they have an "incognito window"
has a visual cue, a little detective in it
Dude, that is totally the wrong graphic for this mode
11:33 But the benefit is that you can browse in private w/o putting
data in your history, cache, etc.
Just like IE8 InPrivate mode. A new required feature... Hello, Mozilla??
11:34 Moving on..
The download file experience...
"You shouldnt have to manage a lot of things to make downloads work"
When you kick off a download, they pop into a little status bar on the
window. When they are completed, you can drag the files to wherever
you want.
So simple, but seems more clear than other browsers' DL functions.
11:35 [Comment From Siddharth]
when can i download this please tell me and where?
11:35 Gotta wait, sorry. They say noon pacific
11:36 A new kind of window for apps that "want to break free of the
browser window"...
the "pinocchio feature"
You can take a site (Gears only? not clear) and "create destkop
shortcut" from it.
The window it opens shows no browser UI, just the app itself.
It acts like a windows app - you can alt-tab to it, etc.
11:37 Next up...
Daren Fisher, Tech Lead
Topic: Under the hood
11:37 "We were very interested in the use case of users who leave
their browsers open for a long time" ... "who have a lot of different
things going on in parallel."
11:39 "It's really unforuntate when you lose your whole browser."
"It seemed obvious to us that it would be nice if the browser were subdivided."
Web pages should be separate from each other.
They are in Chrome. The rendering engine are in "sub child processes"
If one tab dies, you don't lose the other
Tabs can execute in parallel, there's no delay if one tab is busy
11:39 "It's especially nice if you have a dual-core CPU."
Heh, I gots 4 cores on my desktop at home, can't wait to try this
11:40 Security:
The rendering engine has no prividleges to talk to your PC.
11:40 "Bad guys have to find a way out of the sandbox. "
11:41 Demo of Chrome Task Manager
Looks like Windows Task Manager, shows all the processes, their memory
use, CPU use, and network use.
Neat. And yo ucan kill the processes/tab you don't like
Hints that you can minimze tabs
Says plugins run in a process... for example FLASH.
11:43 Demo: What to do with a misbehaving tab...
showing a locked up tab. can't interact or scroll.
But can still switch tabs.
Bad tabs get a cute "sad tab" display
11:44 can recover a crashed tab, back to where it was before crash
11:45 How about a bad plugin?
Showing what happens if you kill Flash process while playing a YouTube
vid... you get a "sad plugin" on the page, but the rest of the page
stays live.
And is easy to refresh the plugin by reloading the page
11:45 And now, the speed demo...
11:46 IE Demo, loading pages off of local file system... takes 220 ms.
Chrome, same demo... 77 ms.
Your milage may vary... we will test this when we get the code
11:47 The download is live, folks!
http://www.google.com/chrome
11:47 Now the V8 talk.
If anyone is still with me....
11:48 BTW I have Chrome running right now... it took like 30 sec to
install. More later, now back to our press conf...
11:49 Guy is talking about how the new virtual machine has "hidden
classes" with shared structure, like java and smalltalk. and I have
no idea what this means.
2 ago 2008
19 jul 2008
19 mar 2008
QueryOnlyNeededData hiberante
{
ISession session = NHibernateSessionFactory.OpenSession();
ICriteria criteria = null; IList result = null; string buffer = null;
// get all sales when querying products we will hit the N+1 select problem
criteria = session.CreateCriteria(typeof(Sale));
result = criteria.List();
// because product.Supplier is mapped as fetch=join the select issued
// for each product will join with the supplier table
foreach (Sale s in result) buffer = s.Product.Name;
// get all sales with the product (no N+1 problem, also don't need supplier so don't get it)
criteria = session.CreateCriteria(typeof(Sale))
.SetFetchMode("Product", FetchMode.Join)
.SetFetchMode("Product.Supplier", FetchMode.Select);
result = criteria.List();
// this cycle will not issue any additional select statements
foreach (Sale s in result) buffer = s.Product.Name;
Program.ListResult("ICriteriaSamples.QueryOnlyNeededData", result);
}
23 dic 2007
Visual Studio 2008 Training Kit
|
El VS2008 Training Kit cubre las siguientes tecnologías:
- LINQ
- C# 3.0
- VB 9
- WCF
- WF
- WPF
- Windows Cardspace
- Silverlight
- ASP.NET AJAX
- .NET Compact Framework 3.5
- VSTO 3.0
- Visual Studio Team System y
- Team Foundation Server
Descargalo: http://go.microsoft.com/?linkid=7602397 (~120 Mb)
25 nov 2007
Binary Serializers Methods
Core Serialization Methods
#region Binary Serializers public static System.IO.MemoryStream SerializeBinary(object request) { System.Runtime.Serialization.Formatters.Binary.BinaryFormatter serializer = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter(); System.IO.MemoryStream memStream = new System.IO.MemoryStream(); serializer.Serialize(memStream, request); return memStream; } public static object DeSerializeBinary(System.IO.MemoryStream memStream) { memStream.Position=0; System.Runtime.Serialization.Formatters.Binary.BinaryFormatter deserializer = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter(); object newobj = deserializer.Deserialize(memStream); memStream.Close(); return newobj; }
4 nov 2007
CodeTranslator: Free Code Translation From VB.NET <-> C#
For now it only supports from VB.NET to C# and from C# to VB.NET.
3 nov 2007
Eval en .NET - Microsoft.JScript.Eval.JScriptEvaluate
Dim overhead As String = "10"
Dim a As Integer
Dim b As Integer
Dim c As Integer
c = 20
a = 10
b = 15
Dim sExpression As String = "a+b"
sExpression = Replace(sExpression, "a", a)
sExpression = Replace(sExpression, "b", b)
MsgBox(sExpression)
Dim oResult As Object
Try
Dim myEngine As Microsoft.JScript.Vsa.VsaEngine = Microsoft.JScript.Vsa.VsaEngine.CreateEngine()
oResult = Microsoft.JScript.Eval.JScriptEvaluate (sExpression, myEngine)
MsgBox(oResult)
Catch ex As Exception
MsgBox(ex.Message & ex.Source)
End Try
Patterns con Ejemplos y Usos - Net & Java


-
Narratives
-
Temporal Patterns
-
Events
-
Accounting Patterns
-
Presentation Patterns
-
Base Patterns
-
Unclassified
Patterns of Enterprise Application Architecture (P of EAA).
These pages are a brief overview of each of the patterns in P of EAA. They aren't intended to stand alone, but merely as a quick aide-memoire for those familiar with them, and a handy link if you want to refer to one online. In the future I may add some post-publication comments into the material here, but we'll see how that works out.
Many of these diagrams demonstrate the rather poor GIF output of Visio. The nice diagrams were redrawn for me by David Heinemeier Hansson
Domain Logic Patterns: Transaction Script (110), Domain Model (116), Table Module (125), Service Layer (133).
Data Source Architectural Patterns: Table Data Gateway (144), Row Data Gateway (152), Active Record (160), Data Mapper (165).
Object-Relational Behavioral Patterns: Unit of Work (184), Identity Map (195), Lazy Load (200)
Object-Relational Structural Patterns: Identity Field (216), Foreign Key Mapping (236), Association Table Mapping (248), Dependent Mapping (262), Embedded Value (268), Serialized LOB (272), Single Table Inheritance (278), Class Table Inheritance (285), Concrete Table Inheritance (293), Inheritance Mappers (302).
Object-Relational Metadata Mapping Patterns: Metadata Mapping (306), Query Object (316), Repository (322).
Web Presentation Patterns: Model View Controller (330), Page Controller (333), Front Controller (344), Template View (350), Transform View (361), Two-Step View (365), Application Controller (379).
Distribution Patterns: Remote Facade (388), Data Transfer Object (401)
Offline Concurrency Patterns: Optimistic Offline Lock (416), Pessimistic Offline Lock (426), Coarse Grained Lock (438), Implicit Lock (449).
Session State Patterns: Client Session State (456), Server Session State (458), Database Session State (462).
Base Patterns: Gateway (466), Mapper (473), Layer Supertype (475), Separated Interface (476), Registry (480), Value Object (486), Money (488), Special Case (496), Plugin (499), Service Stub (504), Record Set (508)
30 oct 2007
Video Curse: Creating an N-Layer ASP.NET Application
| Description | In this video tutorial I walk through the fundamentals of creating an N-Layer ASP.NET application. What is "N-Layer" you ask? N-Layer can be interpreted many different ways, but I generally use the term to mean separating presentation, business and data code into individual code layers. Doing this allows code to be re-used throughout an application and prevents unnecessary clutter in ASP.NET code-behind classes. This video covers creating presentation, business and data layers and also covers another layer I normally add to projects that I refer to as "Model". The model layer contains data entity classes that are used to pass data between the different layers. Other types of architectures can certainly be applied as well. |
| Requirements | .NET 2.0 |
| View Video | Click Here |
| Download Code: |
|
27 oct 2007
Custom Error Pages - IHttpModule
using System; using System.Web; namespace AspNetResources.CustomErrors4 { public class MyErrorModule : IHttpModule { public void Init (HttpApplication app) { app.Error += new System.EventHandler (OnError); } public void OnError (object obj, EventArgs args) { // At this point we have information about the error HttpContext ctx = HttpContext.Current; Exception exception = ctx.Server.GetLastError (); string errorInfo = "
Offending URL: " + ctx.Request.Url.ToString () + "
Source: " + exception.Source + "
Message: " + exception.Message + "
Stack trace: " + exception.StackTrace; ctx.Response.Write (errorInfo); // -------------------------------------------------- // To let the page finish running we clear the error // -------------------------------------------------- ctx.Server.ClearError (); } public void Dispose () {} } } To plug our HttpModule into the pipeline we need to add a few lines to web.config:
<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web> <httpModules> <add type="AspNetResources.CustomErrors4.MyErrorModule,« CustomErrors4" name="MyErrorModule" /> </httpModules> </system.web> </configuration>
event + delegate Visual C# 2.0
El delegado lo definimos de la siguiente forma:
public delegate void MiEventoEventHandler( string param1, int param2);
Y el evento lo definimos del tipo del delegado:
public event MiEventoEventHandler MiEvento;
Ligar un método de evento en C#
public static void UsarMiClase1()
{
MiClase1 prueba = new MiClase1();
// En C# 2.0 o superior no es necesario usar el delegado
// para ligar el método con el evento
prueba.MiEvento += prueba_MiEvento;
prueba.Mostrar("el Guille", 49);
}
static private void prueba_MiEvento(string param1, int param2)
{
Console.WriteLine(
"Se produce el evento MiEvento con los parámetros: {0} y {1}" , param1, param2);
}http://www.elguille.info/NET/dotnet/equivalenciavbcs4.htm
unsafe keyword + Using Pointers in C#
static void Main(string[] args)
{
int age = 32;
Console.WriteLine("age = {0}" , age);
}
unsafe keyword
static void Main(string[] args)
{
unsafe
{
int age = 32;
int* age_ptr;
Console .WriteLine("age = {0}", age);
}
}
Pointers to Structures:
unsafe static void Main(string[] args)
{
Location loc;
loc.X = 100;
loc.Y = 100;
Location* loc_ptr;
loc_ptr = &loc;
Console.WriteLine("X = {0}", loc_ptr->X);
loc_ptr->X = 200;
Console.WriteLine("X = {0}", loc_ptr->X);
}
Pointers and Classes:
For Example:
class PTest
{
public PTest()
{
}
public int age;
public void DisplayAge()
{
Console.WriteLine("age = {0}", age);
}
}
And some example code to create an instance of the class and then manipulate the public variable age using a pointer.
unsafe static void Main(string[] args)
{
PTest p = new PTest();
p.age = 32;
p.DisplayAge();
fixed (int* age = &p.age)
{
*age += 3;
}
p.DisplayAge();
}
INDEXER[] in C#
In c# introduce new concept is Indexer. This is very useful for some situation. Let as discuss something about Indexer.
- Indexer Concept is object act as an array.
- Indexer an object to be indexed in the same way as an array.
- Indexer modifier can be private, public, protected or internal.
- The return type can be any valid C# types.
- Indexers in C# must have at least one parameter. Else the compiler will generate a compilation error.
this [Parameter]
{
get
{
// Get codes goes here
}
set
{
// Set codes goes here
}
}
For Example:
using System;
using System.Collections.Generic ;
using System.Text ;
namespace Indexers
{
class ParentClass
{
private string[] range = new string[5];
public string this[ int indexrange]
{
get
{
return range[indexrange];
}
set
{
range[indexrange] = value;
}
}
}
/* The Above Class just act as array declaration using this pointer */
class childclass
{
public static void Main()
{
ParentClass obj = new ParentClass();
/* The Above Class ParentClass create one object name is obj */
obj[0] = "ONE";
obj[1] = "TWO";
obj[2] = "THREE";
obj[3] = "FOUR ";
obj[4] = "FIVE";
Console.WriteLine( "WELCOME TO C# CORNER HOME PAGE\n");
Console.WriteLine( "\n");
Console.WriteLine( "{0}\n,{1}\n,{2}\n,{3}\n,{4}\n", obj[0], obj[1], obj[2], obj[3], obj[4]);
Console.WriteLine( "\n");
Console.WriteLine( "ALS.Senthur Ganesh Ram Kumar\n");
Console.WriteLine( "\n");
Console.ReadLine();
}
}
}
http://www.c-sharpcorner.com/UploadFile/senthurganesh/109172007050741AM/1.aspx
analytics
Etiquetas
- .NET 2.0 (15)
- ADM PROYECTOS (3)
- AJAX (2)
- Ale Sfrede (1)
- alesfrede (27)
- Arch (3)
- chrome 2.0 (1)
- chrome extension (1)
- CSS XML HTC (2)
- extension (1)
- google (1)
- google chrome toolbar (1)
- init (1)
- News (3)
- realtime (1)
- Scripting (4)
- sfrede (1)
- SQL Server (3)
- translate (1)
Novedades
Headline
rss compartidos de alesfrede
Call Me Online
My Datos
AleCosas
- jun 2012 (1)
- mar 2012 (1)
- feb 2012 (1)
- ago 2011 (1)
- jul 2011 (1)
- jun 2011 (2)
- may 2011 (2)
- abr 2011 (1)
- mar 2011 (1)
- ago 2010 (2)
- jul 2010 (1)
- abr 2010 (4)
- mar 2010 (3)
- feb 2010 (5)
- ene 2010 (1)
- dic 2009 (1)
- nov 2009 (4)
- oct 2009 (3)
- sept 2009 (5)
- ago 2009 (2)
- jun 2009 (1)
- may 2009 (1)
- abr 2009 (2)
- nov 2008 (1)
- oct 2008 (2)
- sept 2008 (5)
- ago 2008 (1)
- jul 2008 (1)
- mar 2008 (1)
- dic 2007 (1)
- nov 2007 (5)
- oct 2007 (16)
Tags
- alesfrede (27)
- .NET 2.0 (15)
- Scripting (4)
- ADM PROYECTOS (3)
- Arch (3)
- News (3)
- SQL Server (3)
- AJAX (2)
- CSS XML HTC (2)
- Ale Sfrede (1)
- chrome 2.0 (1)
- chrome extension (1)
- extension (1)
- google (1)
- google chrome toolbar (1)
- init (1)
- realtime (1)
- sfrede (1)
- translate (1)




