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

Custom Event in VB.Net

Custom Event in VB.Net

Here are the Example for Custom Event in VB.net


Dim _handlers As New List(Of EventHandler)
 Public Custom Event AnyName As EventHandler
        AddHandler(ByVal value As EventHandler)
            AddHandler <Control Name>.<Event>, value
        End AddHandler

        RemoveHandler(ByVal value As EventHandler)
            RemoveHandler <Control Name>.<Event>, value
        End RemoveHandler

        RaiseEvent(ByVal sender As Object, ByVal e As System.EventArgs)
            For Each handler As EventHandler In _handlers
                Try
                    handler.Invoke(sender, e)
                Catch ex As Exception
                    Debug.WriteLine("Exception while invoking event handler: " & ex.ToString())
                End Try
            Next
        End RaiseEvent
    End Event

C# Coding Conventions

C# Coding Conventions


  • Naming Conventions

    Capitalization Conventions
Describes the different casing systems and when each should be used.
    General Naming Conventions
Describes general rules for selecting clear, readable names.
     Names of Assemblies and DLLs
Describes conventions for naming managed assemblies.
     Names of Namespaces
Describes conventions used for namespace names and how to minimize conflicts between namespaces.
     Names of Classes, Structs, and Interfaces
Describes conventions that should be followed, as well as those that should be avoided, when naming types.
     Names of Type Members
Describes the best practices for selecting names for methods, properties, fields, and events.
     Names of Parameters
Describes the best practices for choosing meaningful parameter names.
     Names of Resources
Describes the best practices for selecting names for localizable resources.


  • Layout Conventions
  • Comments Conventions
  • Language Guidelines


Call Class Function in Module

Call Class Function in Module

In Module(S)
Public Function ResultValue(ByVal x As Integer, ByVal y As Integer) As String
        Dim CHelper As CHelper = New CHelper()
        Return "The Result is :" & CHelper.Add(x, y)
    End Function

In Class file
Public Shared Function ResultValue(ByVal x As Integer, ByVal y As Integer) As String
        Return "The Module Result" & Module1.Add(x, y)
    End Function

Call Shared Function in VB.net

Call Shared Function in VB.net
To Create Helper Class file in your project.
 Private Shared str As String
 Public Shared Function Subtract(ByVal x As Integer, ByVal y As Integer) As String
        str = "The Result:" & x - y
        Return str
 End Function
Call Shared Function 
 MessageBox.Show(CHelper.Subtract(15, 10))
Note: you can't Shared Function in the Module

Call Class file Function in VB.net

Call Class file Function in VB.net

To Create Helper Class file in your project.
Public Class CHelper
    Public Function Add(ByVal x As Integer, ByVal y As Integer) As Integer
        Return x + y
    End Function
End Class

Call Class in the VB.net form

Dim cls As CHelper = New CHelper()
MessageBox.Show("The Result:", CStr(cls.Add(10, 10)))

Useful Project Management Tools

Useful Project Management Tools


  • Chili Project
  • Omnigroup
  • Paymo
  • Springloops
  • Comindwork
  • Webprojector
  • Solo
  • Open Atrium
  • Casebox
  • Redbooth
  • Agilezen
  • Producteev
  • Redmine
  • Central Desktop
  • Teamwork
  • Issue Burner
  • Pivotal Tracker


Best Bug Tracking Tools For Developers

Best Bug Tracking Tools For Developers


  • Raygun
  • Exceptional
  • Sentry
  • Sifter
  • Takipi
  • BugHerd
  • Airbrake
  • BugDigger
  • StackHunter
  • BugLogHQ

WPF Version 4.5

WPF Version 4.5

  • Ribbon control
  • Improved performance when displaying large sets of grouped data
  • New features for the VirtualizingPanel
  • Binding to static properties
  • Accessing collections on non-UI Threads
  • Synchronously and Asynchronously validating data
  • Automatically updating the source of a data binding
  • Binding to types that Implement ICustomTypeProvider
  • Retrieving data binding information from a binding expression
  • Checking for a valid DataContext object
  • Repositioning data as the data's values change (Live shaping)
  • Improved Support for Establishing a Weak Reference to an Event
  • New methods for the Dispatcher class
  • Markup Extensions for Events

Convert String to Camel Case in C#.net

Convert String to Camel Case in C#.net

Declare namespace
using System.Globalization;
Method for Convert String into CamelCase in C#.net
  private string  ConvertStringToCamelCase(string str)
        {
            TextInfo obj = new CultureInfo("en-US", false).TextInfo;
            return obj.ToTitleCase(str);
        }
Call ConvertStringToCamelCase() like this
MessageBox.Show(ConvertStringToTitle("Lakshmi nAARAYANAN")); MessageBox.Show(ConvertStringToTitle("lakshmi nAARAYANAN"));
Output:
Lakshmi Narayanan

Hashing Algorithms

Hashing Algorithms
        Hashing is the process of mapping binary data of variable length to a fixed size binary data.
        Applying the same hash function to two identical data structures yields the same result. 
There are two kind of hashing algorithms : with or without a key.
The algorithms without keys are used only to calculate secure hashes for data to ensure integrity, whereas the keyed algorithm are issued together with a key as a MAC for bath integrity.
  • ALGORITHM NAME:SHA1   DESCRIPTION :USES SHA ALGO WITH A RESULTING HASH OF 160 BITS
  • ALGORITHM NAME: SHA256   DESCRIPTION :USES SHA ALGO WITH A RESULTING HASH OF 256 BITS
  • ALGORITHM NAME:SHA 512   DESCRIPTION :USES SHA ALGO WITH A RESULTING HASH OF 512 BITS
  • ALGORITHM NAME:SHA 384   DESCRIPTION :USES SHA ALGO WITH A RESULTING HASH OF 384 BITS
  • ALGORITHM NAME:MD5   DESCRIPTION :USES MD5 HASH ALGORITHM
  • ALGORITHM NAME:RIPEMD160 DESCRIPTION :USES RIPEMD HASH ALGORITHM
Thanks to