Saturday, 30 November 2019

How Genarate GUID in Dot net application

Hello Friends,
         Now I am going to describe What is GUID and how to generate Custom GUID in .net using C#,I hope it will be  helpful for beginner.      

GUID: It is stands for Global Unique Identifier.It is 128-bit int(16 bytes).Dot net framework is used System.GUID class to represent the GUID by the help of Guid.NewGuid() method.

Console Application:

  • Create a console application ,write below code and press F5 to run this console application. 

using System;

namespace ConsoleApp1
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            Guid obj = Guid.NewGuid();
            Console.WriteLine("New Guid is :" + obj.ToString());
            Console.ReadLine();
        }
    }
}

OutPut:Press F5


New Guid is :ce21285a-61ff-4bb5-b006-6c0cf5287f28


In this session I’ve explained how to generate GUID in .net application. So after read please Comments and suggestions.Thanks & Regard
Rabi
























Saturday, 9 February 2019

Create The Simple WebAPI Application using C#.net in 7-Steps


Hello Friends,
 Now I am going to describe how to create Simple WebAPI Application in 7-Steps  without DB Connection using C#.net in Visual Studio 2017.After that We will discuss How to call this WebAPI in MVC application and  create WebAPI Application with DB Connection using 3-layer architecture,I hope it'll be  helpful for beginner, Please follow in below steps                                                                                            

Step:1
Open your Visual Studio go to File Menu and create New Project.










Wednesday, 9 August 2017

How to sort the name in alphabatically order using c#.net


Hello Friends,
           Now I am going to describe  how to sorting the different names in alphabetical order in c#.net.

Code of C#.net:
Simple create the console application and write this code:


class Program
    {
        static void Main(string[] args)
        {
            List<string> arr = new List<string>();
            {
                arr.Add("dotnet");
                arr.Add("java");
                arr.Add("angular");
                arr.Add("wcf");
                arr.Add("mvc");
                arr.Add("sql");
                arr.Sort();
                Console.WriteLine("Your sorted array is :");
                foreach (string sortarr in arr)
                Console.WriteLine(sortarr);
            }
            Console.ReadLine();
        }
    }
              I've explained how to sorting the different names in alphabetical order in c#.net.So after read please Comments and suggestions.

Thanks & Regard
Rabi

Sorting the names in alphabatical order without sort() of C#.net

Hello Friends,
           Now I am going to describe  how to sorting the different names in alphabetical order without using sort function of c#.net.

Code of C#.net:
Simple create the console application and write this code:

class Program
    {
        static void Main(string[] args)
        {
            string[] arr = new string[] { "dotnet", "java", "oracle", "angularjs","nodejs" ,"sql","mvc"};
            int count;
            count = arr.Length - 1;
            for (int i = 0; i < count; i++)
            {
                for (int k = count; k > i; k--)
                {
                    if (((IComparable)arr[k - 1]).CompareTo(arr[k]) > 0)
                    {
                        dynamic name = arr[k - 1];
                        arr[k - 1] = arr[k];
                        arr[k] = name;
                   
                    }
                }
            }
            Console.WriteLine("your sorted name is:");
            foreach (var item in arr)
            {
                Console.WriteLine(item);
            }
            Console.ReadLine();
        }
    }


 
             I've explained how to sorting the different names in alphabetical order without using builtin function of c#.net.So after read please Comments and suggestions.

Thanks & Regard
Rabi

 

Sunday, 27 December 2015

How to register with cascading drop down in mvc4

Hello Friends,
                                Now I am going to describe  how to create a Register form with Cascading Dropdown list and Login form using  MVC4 in C#. Follow the steps.
Step-1
First create a website File->New->Project->select Web from left side-> ASP.NET MVC 4 Web Application->Provide Name(Suppose mvcregistration_dropdown)->click on ->OK->Than Select a template->Internet Application->OK.

Step-2
create four tables,three tables(country,state,city) for dropdown bind and anather table(suppose- userinfo) for save like this: 
country :

state
 
city
 
userinfo

Wednesday, 16 December 2015

CRUD operations,login and registration con



Hellow Friends,
                                Now I am going to describe  how to create your Simple Register form, Login form and How to make CRUD Operation which is very interesting concept  in asp.net using C# with mvc4 platform .It is very intresting concept in mvc.So Please Follow the steps.
Step-1
First create a table in your sql server database(suppose table name is userinfo) like this:
Step-2
Create a store procedure which name is sp_insertpro:

create Procedure sp_insertpro
(
@name varchar(50)=null,
@emailid varchar(50)=null,
@password varchar(50)=null,
@age varchar(50)=null,
@address varchar(50)=null
)
AS
Begin
set nocount on

begin
      Insert Into userinfo(Name,emailid,password,Address) values(@name,@emailid,@password, @address)
end
End

Tuesday, 15 December 2015

Reverse a string using recursion


 Hellow Friends,
                                Now I am going to describe  how to reverse a string with using  recursion function.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace recersfunction
{
    class recursionstring
    {
   public void reversestring(string str)
  {
    if(str.Length > 0) 
      reversestring(str.Substring(1, str.Length-1));
    else 
     return;
  }
}