Banner Ad

Monday, October 14, 2013

Visual Studio Tips & Tricks: 5 - Hexa Decimal values displayed during Debug the application

By Francis   Posted at   9:27 AM   Visual Studio Tips and Tricks No comments
                  Recently, I had a wired problem in Visual studio. In this post i’m going to discuss about it. The problem is, when I try to debug my application in Visual Studio 2010, the values are displayed in Hexadecimal format. Please take a look into the below picture.
Hexa Decimal values displayed during Debug the application
Values of Variable Displayed in Hexa Decimal Format
The reason is somehow the “Hexadecimal Display” option has been checked in the “Watch” window.
“Hexadecimal Display” option in Watch Window
“Hexadecimal Display” option in Watch Window

So that all the values are displayed in Hexadecimal form in watch window too.
So just disable the “Hexadecimal Display” in the watch window’s float menu. The display will correctly display in the decimal form.
Values of Variable Displayed in Decimal Format
Values of Variable Displayed in Decimal Format


Hope this helps someone!

Thursday, October 10, 2013

VB.Net : A Word about “Nothing”!

By Francis   Posted at   2:14 PM   VB.Net Tips and Tricks No comments


                              It’s a common misunderstand of a new programmer in vb.net about the keyword “Nothing”. The main purpose of this keyword is set the default value for an variable type. For example,the default value  for  the  Boolean type variable is “False”. In some cases, we may want to set the default value of that type of the variable. At that time, Nothing keyword comes into picture.

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim strString As String = "Sample String"
        Dim intVar As Integer = 100
        Dim decVar As Decimal = 100.01
        Dim dblVar As Double = 100.233
        Dim blnVar As Boolean = True
        ' Set the variable's Default value by using Nothing 
        strString = Nothing
        intVar = Nothing
        decVar = Nothing
        dblVar = Nothing
        blnVar = Nothing
        lblResult.Text = "Default value of String variable: " & strString & vbCrLf & _
                        "Default value of Integer variable: " & intVar & vbCrLf & _
                        "Default value of Decimal variable: " & decVar & vbCrLf & _
                        "Default value of Double variable: " & dblVar & vbCrLf & _
                        "Default value of Boolean variable: " & blnVar & vbCrLf

    End Sub

Just copy the above code under the Button's click event. Hope this hepls a bit!

Monday, October 7, 2013

VB.Net ByRef Variable : A Small Warning

By Francis   Posted at   12:44 PM   VB.Net No comments
In VB.Net, programmers often used the variable by reference using the keyword ByRef. Normally, reference variables not copied like Value type variables. There are some scenarios arise to use or pass a variable as reference to another function/subroutine and change them within the function/subroutine.

Tuesday, September 24, 2013

Create Virtual Directory in IIS

By Francis   Posted at   7:19 PM   IIS Tips and Tricks No comments
                  In previous posts I have explained how to create a virtual directory from Visual Studio.
In this post I’m going to tell how to create a virtual directory in IIS.
What is Virtual Directory?:
Virtual directory meant that, it is a mapping between the actual web application files and IIS. That is we map the website files to the IIS in Virtual Directory. If you see in IIS, it look like a directory but it actually points the exact web application path.
Create Virtual Directory:
Here I’m going to create a virtual directory in IIS for the web application which is located in the path :
“G:\DotNetExamples\AllInOne”.
Step 1:
Open IIS. To open IIS, press windows key + R key, which opens “Run” window and type “inetmgr” and press enter, which opens the IIS.
IIS-Create_Virtual_Directory-1
Step 2:
In IIS, Right click on the “Default Web Site” and select the “Add Application” in the float menu.
IIS-Create_Virtual_Directory-2
Step 3:
In this “Add Application” window, we need to specify the “Virtual Directory” name and the physical directory where the actual web site files are located. Leave the application pool as is. Click OK.
IIS-Create_Virtual_Directory-3
Step 4:
Now the Virtual Directory has been created under the “Default Web Site”. To test the application Right click the virtual directory and choose “Manage Application à Browse” which will open the application in the respective default browser.
IIS-Create_Virtual_Directory-4
IIS-Create_Virtual_Directory-5
Hope this helps!



















Thursday, September 12, 2013

Code Obfuscation

By Francis   Posted at   1:47 PM   Dot Net Obfuscator No comments

          In this post I’m going to discuss about Reverse engineering and Code Obfuscation. In modern programming trends, when we publish a website or dll file to a client machine, there are lot of chance to theft our code. That is if we publish a class library as a dll, there are lot of tools available for simply reverse engineer that dll. So that the person can see the source of such files, which is a potential thread for software companies who does not want to share the source code to the end user.

Below are the some tools which is used to decompile the dll:

Dot net reflector – From Redgate
Dot net decompiler (Dot Peek) – From Jetbrains
Just Decompile – Free tool From Telerik 

What is Obfuscation?
                   Obfuscation is a process to convert the (source code or machine) code into a difficult form which cannot easily read by humans.
Eventhough, obfuscation does not guaranteed 100 % of code safety. However it will make the process too hard, that is getting the source from the dll or exe. In my professional life, I have experienced with DeepseaObfuscator tool.

Here are the list of Obfuscation Tool for .Net:


Hope this helps!
Connect with Us