Visual Studio 2013 Countdown
Oct19

Visual Studio 2013 Countdown

It’s quite amazing to see people everywhere talking about the launch of visual studio 2013. We thought, even we should also get the feel of the new version. First thing, which I noticed, was the countdown running at Visual Studio 2013 Countdown. The information which we share here is assembled from different resources like Visual Studio story Visual Studio 2013 is designed to target the growing needs of the market. Nowadays, Market requirements says, Target Multiple screens and devices. Data Availability. Services Availability. Security. Visual Studio 2013 provides, Innovative features for greater developer productivity. Productivity features such as automatic bracket completion, the ability to move code lines or blocks using keyboard shortcuts, and in-line navigation. New Peek Definition feature to view a definition in an inline view in code file. CodeLens (Code Information Indicators) shows information such as changesets, last person to edit the method, unit tests and what code references exists. And more… Support for Windows 8.1 app development. Coded UI test support for XAML apps. UI Responsiveness Analyzer and Energy Consumption profiler for XAML & HTML apps. Enhanced memory profiling tools for HTML apps. Windows Azure Mobile Services. Web development advances. One ASP.NET vision unifies ASP.NET WebForms, MVC or Web API. Browser Link connects Visual Studio to one or more open modern browsers to keep markup changes in sync without manually refreshing every time. Debugging and optimization improvements for native and managed code. Performance and Diagnostics hub unifies various tools. Memory Dump Analyzer diagnose memory leaks and inefficient memory usage issues. PGO (Profile Guided Optimization) uses profile data to identify the hotter and colder paths. Expanded ALM capabilities. Agile portfolio management. Team rooms for team collaboration. Web-based code comments on changesets/commits. Web-based test case management through web interface. Work Item Charting to visualize data. These are very high level points about visual studio 2013. If you want to read about them in detail,visit the link provided...

Read More
Unused Useful Tools in Visual Studio
Jan25

Unused Useful Tools in Visual Studio

Back from a vacation is always a great and refreshing feeling. A small break always adds a new dimension to the thoughts. Lets see what we have today which we can call ‘new’ . We are good working on visual studio and enjoy doing coding because we love it the most, but we simply ignore the tools that comes as a package with Visual studio and ever uses them. Microsoft has put a lot of effort in these tools to make developer’s life easy and comfortable but we as a developer only think of making it more complex. It’s a comment out of humor and trust me,it’s not the reality. GuidGen This tool can be used to generate a GUID in a variety of formatting options.This tool is very useful in conditions where unique identifier is required to identify a component or a lot of IDs are required during testing. On the Tools menu, click Create GUID. The Create GUID tool appears with a GUID in the Result box. Select the format you want for the GUID. Click Copy and paste it wherever required in source code. ErrLook ERRLOOK is the short name for Error Lookup.It retrieves a system error message or module error message based on the value entered. On the Tools menu, click Error Lookup. The Error Lookup tool appears with a Value box. Drag and drop a hexadecimal or decimal value from the Visual Studio debugger into the Value box . Click Look Up button and ERRLOOK retrieves the error message text automatically and populates the Error Message text area. Click the Modules button to bring up the Additional Modules for Error Searching dialog. Enter the name of the desired EXE or DLL in the edit box and click Add to include the modules in your error message search. Remove a module from the list by highlighting it and clicking the Remove button. Note: Modules listed in the Additional Modules for Error Searching dialog are also searched. AtlTraceTool8 This tool is called as ATL/MFC Trace Tool. It is used to display debug trace messages in the ATL and MFC sources. Open an MFC or an ATL project. On the Debug menu, click Start Debugging. On the Tools menu, click ATL/MFC Trace Tool. Expand the nodes in the Trace List tree. The running application, modules within that application, and trace categories for each module are displayed. Use the controls in the Process group, Module group, and Category group to customize how information is displayed in the Output window for each process, module, or trace category. Click Apply. Below screenshot is taken without any MFC project and is...

Read More

C#: Anonymous Type is not anonymous!

Why Anonymous Type? Anonymous types provide you the ease of having set of properties (Read only) into a single object without knowing the type. It’s the job of compiler to generate the type information. Anonymous types can be created by using the keyword new. Say: var test = new { Name = “Jackie”, ID = 123 }; Here ‘var’ keyword plays an important role as the type information won’t be available. Anonymous types are mostly used with the query expressions. This type can contain one or more Pubic read only properties. The most common scenario where Anonymous types are useful is shown below: var details = from data in dt.AsEnumerable() select new { UID = data.Field("id"), FirstName = data.Field("fName"), LastName = data.Field("lName”), Mobileno = data.Field("mno"), Address = data.Field<string>("add") }; Here, the DataTable dt already has some members or properties say. Now let’s say you don’t need to have all the properties or members of dt. Then in that case we will make use of Anonymous type using the new keyword. This causes smaller amount of data to be dealt with. Here we have specified the member names to the upcoming Anonymous type (UID, FirstName etc..)which is not necessary. If at all, we are not passing any names to the members, compiler will use the name of the members of the existing type(id, fname, lname etc..). As this article is based on developer’s experience so Please provide more inputs to improve this...

Read More
C#: Useful JSON in .Net
Dec03

C#: Useful JSON in .Net

Why JSON? All web applications revolve around large chunk of data and availability of that data to our application is of utmost importance. To do that, we have options like fetch data from database and sometimes from XMLs. As a result of which we end up hitting DB/File system several times and ultimately compromises with Page speed and performance. JSON- JSON (JavaScript Object Notation) is the solution to avoid all the difficulties with respect to data. Today we will try our hands on using JSON in .Net: The very first thing which is required to use JSON in our code is a namespace. System.Web.Script.Serialization Now the most important class, JavaScriptSerializer Let the play begin: Consider you have a DataTable dt filled with all your DB contents (Columns: UID, Firstname, Lastname, Mobileno, Address and many more) and you need to have these data handy. Then Query this data by linq query.  CODE: var details = from data in dt.AsEnumerable() select new { UID = data.Field("UID"), FirstName = data.Field("FirstName"), LastName  = data.Field("LastName”), Mobileno = data.Field("Mobileno"), Address = data.Field<string>("Address") }; This code has created an anonymous type (Read more about Anonymous type here ) CODE: Now this variable ‘details’ can be serialized to a JSON string as shown below. string JsonString = string.Empty; JavaScriptSerializer jsSerialize = new JavaScriptSerializer(); JsonString = jsSerialize.Serialize(details); //Created above This ‘Jsonstring’ variable will be available to our .aspx (design view) for display or any other operation as per the request The data in the string looks like this: [ { "UID": 1316134065, "Firstname": Jason, "Lastname": "Bourne", "Mobileno": "1234567890", "Address": "XYZ" }, { "UID": 1316134065, "Firstname": Jason, "Lastname": "Bourne", "Mobileno": "1234567890", "Address": "XYZ" } ] On the similar lines, you can do a vice-versa action too. Wondering how? Let’s see how to parse a JSON object using the same class JavaScriptSerializer. Create an instance of JavaScriptSerializer and then call Deserialize function to work on the JSON string which return a Dictionary object Dictionary. CODE: string json = “[{“Firstname”:”Test”, . . . ”; JavaScriptSerializer jsSerialize = new JavaScriptSerializer (); Dictionary dict = jsSerialize.Deserialize(json); Now you have the Dictionary to play around with the data. Enjoy...

Read More

How to create a MVC 2 Project in VS2010?

How to create a MVC 2 Project in VS2010? 1. Open VS2010. 2. Select File -> New Project. 3. Select Visual C# -> Web -> ASP.NET MVC 2 Empty Web Application. Name it as MyMvcApplication. Click ‘OK’. 4. To Add a controller, right click Controllers. Select Add -> Controller 5. Name the controller as ‘HomeController’. Click ‘Add’. 6. The controller page will look like shown below. 7. To Add the Index, right click on anywhere on the Index() method. Click ‘Add View’. 8. The below screen will be shown. Unselect ‘Select master page’ and click on ‘Add’. 9. The Index view will be added and will be shown as below. 10. Type the text “Hello! This is My MVC Application.” within the tags. 11. Press ‘F5’ to run the application. The browser will open as in screen...

Read More
Page 1 of 212