.net Wand
.net used for magic
Browse by Tags
All Tags
»
.net
(
RSS
)
Ajax
asp.net
C#
free books
fun
tips
Delegates to LINQ [passing logic as a parameter] (part I)
Friday, February 08, 2008 9:03 AM
it's normal to pass data to a function just thow in a parameter of the type of data you want to pass and ur set public int add ( int i, int u ){ return i+u; } now think in a different way, u now want to build a set of operations that the user can choose from now what you need is to build a function that would take the user's input and the operation as...
Read More...
Have u ever needed to extend a string? [Extension Methods]
Thursday, December 27, 2007 6:34 AM
well it's not inheritable by default so you can not extend it. that used to be the case before c# 3.0 now you can specify all the functionality that you need in an Extension Method. problem lies in that the extension method needs to access the instance of the object you are extending well, it goes like this 1- first you declare a static class with ur static...
Read More...
Object and Collection Initializers
Wednesday, December 26, 2007 5:03 AM
well also one of the nicest features in c# 3.0 is the object initializers well we used to do this 1: Employee emp = new Employee(); 2: emp.FirstName= "Amir" ; 3: emp.LastName= "Magdy" ; 4: emp.Title = "Mr." ; i actually hated writing this previous snippet now in c# 3.0 we do this 1: var emp = new Employee {FirstName= "Amir"...
Read More...
Auto Implemented Properties
Monday, December 24, 2007 2:23 AM
C# 3 comes with a very nice feature (not undermining the power of lambda expressions and Linq), just this one shows how nice the language has evolved into 1: class Employee 2: { 3: public string firstName { get; set; } 4: } you see the previous code will act as a full blown property that maintains its instance value internally the compiler creates a member and...
Read More...
Happy Holidays
Sunday, December 23, 2007 8:29 AM
VB9 song 1: Module VB 2: Dim myvar As Integer ?() = {3 * 3} 3: Sub Main() 4: For Each i In myvar 5: Console.Write( "Hello VB" ) 6: With i 7: Console.Write(.Value) 8: End With REM a language so true 9: If i IsNot Nothing Then 10: Console.WriteLine() 11: End If REM 12: Console.Write(<some>xml</some>) 13: Next 14: End Sub 15: End Module
Read More...
Free E-books
Sunday, December 23, 2007 3:09 AM
Microsoft has opened 3 MS Press books completely FREE for public. The books are: · Introducing Microsoft LINQ by Paolo Pialorsi and Marco Russo (ISBN: 9780735623910) This practical guide covers Language Integrated Query (LINQ) syntax fundamentals, LINQ to ADO.NET, and LINQ to XML. The e-book includes the entire contents of this printed book! · Introducing Microsoft...
Read More...
Enumerate Embedded Resources
Tuesday, December 04, 2007 3:11 AM
sometimes you just need to include an image or an XML file with your package but you don't want to allow users to access these files and modify them, all you have to do is to embed these files in your assembly if this assembly is a DLL or an EXE. just add the files to your project and from the file properties select the build action to be "Embed Resource"...
Read More...
Ajax.net cancel a request
Monday, November 12, 2007 12:06 PM
well this is one of my old blog posts i'll be resposting them by time ammong new ones here we go this is very important if i have a request that i have issued using asp.net ajax client library this is how to cancel it 1: serviceHandler = new ServiceName().methodName(param1, param2, completeHendler ,errorHandler ); 2: // just keep the serviceHandler variable...
Read More...
Go
This Blog
Home
Contact
Links
About
Tags
.net
Ajax
asp.net
C#
code generation
free books
fun
IIS
industry news
javascript
open source
software engineering
source control
SQL Server
tips
tools
vs.net
WebControls
Navigation
Home
Blogs
Forums
Archives
November 2008 (1)
September 2008 (1)
August 2008 (2)
March 2008 (4)
February 2008 (2)
December 2007 (13)
November 2007 (16)
Web 2.0 stuff
Syndication
RSS
Receive Email Updates
Subscribe