vijay

welcome Netizen

welcome Netizen
Hi folks this site Share Basic Knowledge in .NET, DotNet, C#,DOT NET CODE, ASP.NET, VB.NET, DOT NET TRICKS,Dotnetcode,Android and Latest Technology Articles in VB,Android and ASP.NET

Friday, December 28, 2012

Data Types in C#


Introduction
In C# every variable is associated with a data type. Data types specify the size and type of the values that can be stored.
The types in C# are divided into two types
1. Value types
2. Reference types
Both value types and reference types are differ in characteristic
Difference between value types and reference types

Value type:
Value type are stored on the stack and when a value of a variable is assigned to another variable, the value is actually copied i.e. two identical copies of the value are available in memory
Normally the value types are grouped in two categories...
User Defined types:
·         Enumeration
·         structures
Predefined types
·         Integers
·         Real Number
·         Boolean
·         Characters
Eg:
int m=10;
int n;
N=m; Here the value are actually copied.
Reference Type:
Reference type are stored on the heap and when a value of a variable is assigned to another variable, only the reference is copied, actual value remains in the same memory location i.e. two reference to a single value
  
 Reference types also divided into two groups
·         User Defined types
·         Predefined types
User defined types:
·         Classes
·         String
·         Delegates
·         Array
Predefined types
·         Object type
·         String type
Eg:
Object  m=10;
Object n;
N=m; Here only the reference has been copied, the value are stored same location,any changes on m also affect the changes on n.

If you like this article share this information with your friends
Post your comments here..

Wednesday, December 26, 2012

How to recover the data file from USB PEN Drive or Flash Drive


Hi...Here I would like to share some useful information about USB pen drive. Now a day’s mostly the USB Flash drive are used to save the data, because it’s very easy to carry and easy to transfer the data.
However everything has its  advantage and disadvantage, for USB causing virus is one of the major problem, because we used it at various system so it’s have more possibilities to get virus on pen drive result the data stored in the pen drive should loss the visibility i.e. data are not  shown on the pen drive.
When you see the properties it will show the size of the data. Now data has been present as hidden in the pen drive. To recover the data you need to follow the below steps
Steps:
1.       First insert the pen drive on your system
2.       Go to start->Run
3.       Enter cmd on Run window
4.       Now the black dos prompt will be open
5.       Then enter the USB pen drive letter for an example pen drive has e: drive
6.       Enter E:
7.       Enter the below command
attrib -h -s -r /s/d *.*
8.       Now press enter now you can open pen drive and check your lossed data is present in your pen drive


That’s it. If you think this would helpful then share this article with your friends….

Tuesday, December 25, 2012

Useful Shortcut key for windows XP


Now days most of the system survive only by using windows xp ,for that main reason is its very fast, easy to use and its working for even low configuration system’s .Normally in XP we use only mouse for all the operation. For an every movement in mouse also have shortcut key in keyboard.
Already we know some shortcut key in window xp.But knowing these shortcut key useful to use without mouse option
Shortcut key:

Windows key=Used to open start menu in taskbar
Windowskey+R=Used to open Run command prompt.
windowsKey+M=Used to minimize all the open windows.
WindowsKey+E=Used to open MyComputer
WindowsKey+F=Used to open search option in windows.
WindowsKey+D=Used to view desktop or to minimize all open windows
WindowsKey+Pause=Used to view system properties
Alt+SpaceBar+N=Used to minimize current program window
Alt+SpaceBar+R=Used to restore current program window
Alt+SpaceBar+C= Used to close current program window
Shift+Delete=Used to delete file without sending to Recycle Bin

I hope this shortcut should be useful to someone…

Friday, December 21, 2012

Encapsulation in C#


Main concept of encapsulation is data hiding or information hiding.
Encapsulation provides the ability to hide the internal details of an object from its users. The outside user may not able to change the state of the object directly. Inside the state of the object altered directly by using access modifier keyword public, private and protected.
Just I illustrate with one example.
Take once class, inside the class write the logic to check the enter age from the user. This logic has been implemented in the class the derived class may not know the logic i.e. called as data hiding.
Class A
   private String studname;
    private int studage;

    public string name
    {
        get
        {
            return studname;
        }
        set
        {
            studname = value;
        }
    }
    public int age
    {
        get
        {
            return studage;
        }
        set
        {
            if (value <= 18)
            {
                throw new Exception("Invalid age");
               
            }           
                studage = value;
                      
        }

    }

In an another class use the class A, when u enter the age less than 18 then it will throw the exception error

  try
        {
            ClassA obj = new ClassA();
            obj.age = 22;
            int rrr = obj.age;
            obj.name = "tr";
            Response.Write(rrr);
        }
        catch (Exception ex)
        {
            Response.Write(ex);
        }


 That’s it I hope you understood the concept behind on the encapsulation in oops
Post your feedback………

Monday, December 10, 2012

Type Indian rupee symbol on your keyboard


I would like to share the font to use indian rupee symbol on your keyboard. i hope it will be very useful those who work daily on currency text
 
For those who have not yet installed INDIAN RUPEE Symbol in their computers,
 
Now we have a Rupee Symbol to represent the Indian currency.
Downlaod  the attached Rupee Foradian.ttf file in following location C:\Windows\Fontsrun the file from that folder.
 
Usage - following key is used to type in the Rupee Symbol, 
For example, open word file Select the font "Rupee Foradian",,,,,,,
and type in using the button
 "cid:_1_0F8E52B00F8E4F780026E25865257765~", 

Tuesday, December 4, 2012

How to download videos from YouTube


Here I would like to share some easy way to download YouTube videos from YouTube website.
For downloading videos you don’t need install any new software instead you can use your Mozilla browser to download the videos from YouTube.
Follow the below steps to download videos from YouTube.
1. For download you need Mozilla FireFox browser, I hope everyone have the browser in your PC.
2. Now open Mozilla firefox Goto Tools and click Ad-ons
3. In the Add-ons manager window search and install easy YouTube video downloader plugin.
4. Once you downloaded the plugin the screen looks like below.

5. That’s it now open browser with YouTube website now you can get download button on the youTube website.you can easily download any videos with diffrent format from the YouTube Website

Windows screen look like below..


If you have any comments post here……….

Saturday, December 1, 2012

Difference between classes and struct(structures) in C#


In c# provides a unique way of packing together different data types called as struct.
Struct is a simple lightweight alternative to class,but struct are basically same as class even though they have some significant difference between struct and class.

Classes
Structs
Classes are declared using Class keyword
Struct are declared using Struct keyword
Its  a refrence type therefore its stored on the heap
It’s a value type and therefore stored on the stack
Support inheritance
Does not support inheritance
Default value of the class type is null
Default value is the value produced by ‘zeroing out’
Permit initialization of instance fields
Do not Permit initialization of instance fields
Permit declaration of parameterless constructors
Do not Permit declaration of parameterless constructors
Destructors is supported
Destructors is not supported
Assignment copies the reference
Assignment copies the vaues