הבלוג של מאור - Maor's blog

טכנולוגיה ושאר ירקות

על הבלוג

RSS

 

מהבלוג שלי ב msdn

maor's blog

↑ Grab this Headline Animator

התחבר אלי

Maor's Facebook profile  Follow Maor on Twitter  Maor's profile on Linkedin  Maor in FriendFeed 
       

Blog Roll

My Favorite Technologies

Links

Team System Forums

RSS

Blog Pages

Browse by Tags

All Tags » C# (RSS)
VB.NET and C# Comparison
Sometimes we need a simple VB.NET & C# side by side comparison . This sheet doesn't include all features, but its great place to start with.
Suppress Code Analysis Warnings In Code
Code analysis provides a way of making sure our assemblies don’t violate the programming and design rules set forth in the Microsoft .NET Framework Design Guidelines (including issues related to Globalization, Security, Performance, Portability, and many more).  We can run code analysis from the IDE and from MSBuild. To do it, we first have to turn on Code Analysis from within the IDE. To do it we have to open the project properties, and in the Project designer, we should select the Code Analysis...
Visual Studio 2008 and .NET Framework 3.5 Training Kit
Microsoft released a nice training kit (~126MB) (it's a real treasure!) for the latest technologies. This package covers a bunch of technologies and includes presentations, hands-on labs, and demos. This content is designed to help you learn how to utilize the Visual Studio 2008 features and a variety of framework technologies including: Visual Studio Tools for Office Visual Studio Team System Application Lifecycle Management C# 3.0 VB 9.0 LINQ WPF WCF WF Silverlight ASP.NET AJAX CardSpace Mobile...
NDepend - Great Static Analyzer
Few week ago, I've been asked by Patrick Smacchia , a C# MVP to try this tool. I really want to thanks Patrick to give me the chance to evaluate a professional edition. I installed it and start working with. After using this tool, it's my most favorite tool to reviewing my code! NDepend is an excellent tool that is designed to provide a very deep analysis of your compiled code to help you understand and control your development effort by managing both the quality and the complexity of your...
How to prevent SQL injections
Many applications include code that looks like: 1: string sqlStmt = "SELECT * FROM USERS WHERE UserName= '" + un + "' AND Password='" + pwd + "'" ; Admit it...it's ugly, but you constructed SQL statements like this one. The variables un,pwd are provided by the user. The problem with this SQL string is that the attacker can piggyback SQL statements in one of them. What if the attacker enters this: un = maor, pwd = 123456' OR 1=1 . The following...
C# Coding standards guideline
Scott Guthrie published another post in the link listing series . One of my favorites, is the link to the C# coding standards document , which was written by Juval Lowy from IDesign . As Scott wrote: Extremely useful if you are looking for a concise checklist of good suggestions to keep your codebase clean. Technorati Tags: Coding Standards , .NET , C#
C# 3.0 var keyword
C# 3.0 has many-a-new features. This post will explain the 'var' keywork and the concept of Implicitly Typed Variables. The var keyword is not a late-bound or un-typed variable reference. The var keyword always generates a strongly typed variable reference . The main idea is that the developer is not required to define the type of the variable at the time of declaration, but it is the task of the compiler to decide what type of the object the variable is. The compiler infer the type of the variable...
C# attributes
I asked too much by .NET developers about attributes and their meaning. I hope that this post will help you to understand it better. Introduction: what are attributes? An attribute is a powerful .NET language feature that is attached to a target programming element (e.g., a class, method, assembly, interface, etc.) to customize behaviors or extract organizational information of the target at design, compile, or runtime. It is a clean approach to associate metadata with program elements and later...
Save datagrid changes in the database
Once you want edit a recore, add new or deleted a recored in your data grid you may want to save it in the database. How do we do it? Create UpdateCommand handler for the data grid Identify what DataGrid row was updated by getting the ItemIndex property of the row ( Item object) passed in the event object. Then use the index value to get the corresponding value out of the grid's DataKeys collection: string key = DataGrid1.DataKeys[e.Item.ItemIndex].ToString(); Get the changed values out of the DataGrid...