h1.post-title { color:orange; font-family:verdana,Arial; font-weight:bold; padding-bottom:5px; text-shadow:#64665b 0px 1px 1px; font-size:32px; } -->

Pages

.NET Framework Application Essentials


  • Working with Base Types
  • Collections and Data Structures
  • Generics in the .NET Framework
  • Handling and Raising Events
  • Handling and Throwing Exceptions
  • File and Stream I/O
  • Dates, Times, and Time Zones
  • Programming with Application Domains and Assemblies
  • Serialization [from BPUEDev11]
  • Resources in Desktop Apps
  • Globalizing and Localizing .NET Framework Applications
  • Accessibility
  • Extending Metadata Using Attributes
  • 64-bit Applications


Override ToString Method in VB.Net

This is a Example for Override ToString Method in VB.Net

Public Class Class1
    Public idx As Integer
    Public Overrides Function ToString() As String
        Return Me.idx.ToString() + " " + "VB.Net"
    End Function
End Class
Paste this following code in your main form  
        Dim cl As Class1 = New Class1
        cl.idx = 100
        MessageBox.Show(cl.ToString())
Result:
100 VB.Net

Override ToString Method in C#.Net

This is a Example for Override ToString Method in C#.Net

To Create a Class File for Convert a integer into string

        private int idx;
        public Class1(int idxs)
        {
            this.idx = idxs;
        }
        public override string ToString()
        {
            return this.idx.ToString() + " " + "Good";
        }
Paste this following code in your main form
   Class1 cls = new Class1(10);
            MessageBox.Show(cls.ToString());

Output:
10 Good