<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Nitish Prajapati</title>
    <description>The latest articles on Forem by Nitish Prajapati (@nitishprajapati).</description>
    <link>https://forem.com/nitishprajapati</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F466711%2F6018b487-5db9-4747-8250-d2e53bbf3ebc.png</url>
      <title>Forem: Nitish Prajapati</title>
      <link>https://forem.com/nitishprajapati</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/nitishprajapati"/>
    <language>en</language>
    <item>
      <title>C# Collection Framework</title>
      <dc:creator>Nitish Prajapati</dc:creator>
      <pubDate>Mon, 10 Apr 2023 18:37:31 +0000</pubDate>
      <link>https://forem.com/nitishprajapati/c-collection-framework-55md</link>
      <guid>https://forem.com/nitishprajapati/c-collection-framework-55md</guid>
      <description>&lt;p&gt;For many applications, we want to create and manage groups of related objects.&lt;br&gt;
There are two ways to group objects:-&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jb8urqCZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/suyg5bjggf851h2sa1p3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jb8urqCZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/suyg5bjggf851h2sa1p3.png" alt="Image description" width="742" height="546"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Arrays are most useful for creating and working with a fixed number of strongly typed objects.&lt;/p&gt;

&lt;p&gt;Collections provide a more flexible way to work with groups of objects. Unlike arrays, the group of objects you work with can grow and shrink dynamically as the needs of the application change. For some collections, you can assign a key to any object that you put into the collection so that you can quickly retrieve the object by using the key.&lt;/p&gt;

&lt;p&gt;A collection is a class, so you must declare an instance of the class before you can add elements to that collection.&lt;/p&gt;

&lt;p&gt;Generally there are 3 types of Collections:-&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;System.Collections.Generic Classes&lt;/li&gt;
&lt;li&gt;System.Collections.Concurrent Classes&lt;/li&gt;
&lt;li&gt;System.Collections.Classes&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's start with using a Simple Collection:-&lt;br&gt;
We will be Implementing the generic List class , which enables you to work with a strongly types list of objects.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Creating a list of strings
var salmons = new List&amp;lt;string&amp;gt;();
salmons.Add("chinook");
salmons.Add("coho");
salmons.Add("pink");
salmons.Add("sockeye");

// Iterate through the list.
foreach(var salmon in salmons)
{
    Console.Write(salmon + " ");
}
//Result: chinook coho pink sockeye
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the contents of a collection are known in advance, you can use a collection initializer to initialize the collection.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Create a list of strings by using a
// collection initializer.
var salmons = new List&amp;lt;string&amp;gt; { "chinook", "coho", "pink", "sockeye" };

// Iterate through the list.
foreach (var salmon in salmons)
{
    Console.Write(salmon + " ");
}
// Output: chinook coho pink sockeye

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can use a for statement instead of a foreach statement to iterate through a collection. You accomplish this by accessing the collection elements by the index position. The index of the elements starts at 0 and ends at the element count minus 1.&lt;/p&gt;

&lt;p&gt;The following example iterates through the elements of a collection by using for instead of foreach.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Create a list of strings by using a
// collection initializer.
var salmons = new List&amp;lt;string&amp;gt; { "chinook", "coho", "pink", "sockeye" };

for (var index = 0; index &amp;lt; salmons.Count; index++)
{
    Console.Write(salmons[index] + " ");
}
// Output: chinook coho pink sockeye

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The following example removes an element from the collection by specifying the object to remove.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Create a list of strings by using a
// collection initializer.
var salmons = new List&amp;lt;string&amp;gt; { "chinook", "coho", "pink", "sockeye" };

// Remove an element from the list by specifying
// the object.
salmons.Remove("coho");

// Iterate through the list.
foreach (var salmon in salmons)
{
    Console.Write(salmon + " ");
}
// Output: chinook pink sockeye

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The following example removes elements from a generic list. Instead of a foreach statement, a for statement that iterates in descending order is used. This is because the RemoveAt method causes elements after a removed element to have a lower index value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var numbers = new List&amp;lt;int&amp;gt; { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };

// Remove odd numbers.
for (var index = numbers.Count - 1; index &amp;gt;= 0; index--)
{
    if (numbers[index] % 2 == 1)
    {
        // Remove the element by specifying
        // the zero-based index in the list.
        numbers.RemoveAt(index);
    }
}

// Iterate through the list.
// A lambda expression is placed in the ForEach method
// of the List(T) object.
numbers.ForEach(
    number =&amp;gt; Console.Write(number + " "));
// Output: 0 2 4 6 8

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For the type of elements in the List, you can also define your own class. In the following example, the Galaxy class that is used by the List is defined in the code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;private static void IterateThroughList()
{
    var theGalaxies = new List&amp;lt;Galaxy&amp;gt;
        {
            new Galaxy() { Name="Tadpole", MegaLightYears=400},
            new Galaxy() { Name="Pinwheel", MegaLightYears=25},
            new Galaxy() { Name="Milky Way", MegaLightYears=0},
            new Galaxy() { Name="Andromeda", MegaLightYears=3}
        };

    foreach (Galaxy theGalaxy in theGalaxies)
    {
        Console.WriteLine(theGalaxy.Name + "  " + theGalaxy.MegaLightYears);
    }

    // Output:
    //  Tadpole  400
    //  Pinwheel  25
    //  Milky Way  0
    //  Andromeda  3
}

public class Galaxy
{
    public string Name { get; set; }
    public int MegaLightYears { get; set; }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Further we will discuss more about the different classes in Collection framework.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>IIS Server Setup for Beginners/Newbie for .NET</title>
      <dc:creator>Nitish Prajapati</dc:creator>
      <pubDate>Mon, 11 Jul 2022 04:52:52 +0000</pubDate>
      <link>https://forem.com/nitishprajapati/iis-server-setup-for-beginnersnewbie-for-net-1i64</link>
      <guid>https://forem.com/nitishprajapati/iis-server-setup-for-beginnersnewbie-for-net-1i64</guid>
      <description>&lt;p&gt;IIS(&lt;strong&gt;Internet Information Services&lt;/strong&gt;) is Web Based Server used for Hosting the Web Sites.&lt;br&gt;
IIS simply uses the .NET Framework 4.8(which is latest) and hosting bundle for Hosting the Web Sites and .NET Core for Hosting application build in .NET Core.&lt;br&gt;
Link to Framework is in below:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/hosting-bundle?view=aspnetcore-7.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However in General Web Server is just similar to your local computer. &lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  IIS and Application Pool:-
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
Generally a local machine in case need a user to run the System , In your case you are using your own local machine so you yourself becomes the User.&lt;br&gt;
But in case of the IIS Server we have &lt;strong&gt;&lt;em&gt;Application Pool&lt;/em&gt;&lt;/strong&gt; who which run/operate in our absence the whole server depends on Application Pool &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F23y7yik2tgzjq147eoc3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F23y7yik2tgzjq147eoc3.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Sites:-
&lt;/h2&gt;

&lt;p&gt;If you want to configure for your website all we need to do is to configure Physical Path of the website(&lt;strong&gt;As you know IIS server itself is the Computer&lt;/strong&gt;).&lt;br&gt;
Keep all your Code(Build) and Script in a specific Path in any Drive , Ensure that we Application and IIS Application has the permission to &lt;strong&gt;Read, Write and Modify&lt;/strong&gt; (Incase if you want to store any file on IIS Server will allow the same through Application Pool)&lt;br&gt;
Then you have to bind you website incase of Http and Https we have specified ports in the IIS.&lt;/p&gt;

&lt;p&gt;Some more configuration are required but this is the Basic requirement from where you can start your configuration for Hosting your own website on local.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>microservices</category>
      <category>network</category>
      <category>setup</category>
    </item>
    <item>
      <title>API Integration: Request and Response</title>
      <dc:creator>Nitish Prajapati</dc:creator>
      <pubDate>Fri, 11 Sep 2020 06:35:29 +0000</pubDate>
      <link>https://forem.com/nitishprajapati/api-integration-request-and-response-1de5</link>
      <guid>https://forem.com/nitishprajapati/api-integration-request-and-response-1de5</guid>
      <description>&lt;h1&gt;
  
  
  &lt;strong&gt;WHAT IS API?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;API Stands for &lt;strong&gt;Application Programming Interface&lt;/strong&gt;.API enables interaction with Data, Application, and Services. API delivers data between devices and programs. Using API we access the Data in Request and Response format. That's all for API now let's talk about the working &lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;WORKING OF API's&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;API Integration needs to be Done for the working of APIs.&lt;/p&gt;

&lt;p&gt;STEP'S:-&lt;br&gt;
First of all the Response from APIs are in JSON(Javascript Object Notation) format and the Same format is used for Request.&lt;br&gt;
In the Application, the Request Headers and Request Body are Constructed for Accessing the Details Device from Where the Request is Send. So at the End Point, the Server knows from where the Request is Generated.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Request Body in C#:-
  namespace Request_Body
{
  public class Request_class_name
  {
   //Details
  }
  public class Main_Request_Body
  {
   //Details
  } 
  public class Request_Body
  {
   //Details
   //Request Body
   //Request Header
  } 
  public class Request_Root
  {
   //Details
  }

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;That is the Request Body for Sending Request to API&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This API Request with the Help of Request Header and Request Body is Send to ESB(Enterprise Service Bus) Path where the Response is Generated where the Endpoint is Hit and Response is Send Back to Device&lt;/p&gt;

&lt;p&gt;The request is Converted into JSON format from Object Format this is an Important Step which needs to be Done Carefully.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After getting a response from ESB we Need to store in Response Body&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Response Body in C#:-
  namespace Response_Body
{
  public class Response_class_name
  {
   //Details
  }
  public class Main_Response_class_name
  {
   //Details
  } 
  public class Response_Body
  {
   //Details
   //Response Body
   //Response Header
   //Status 
  } 
  public class Response_Root
  {
   //Details
  }

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Here Status Shows whether the Request is Valid or What is Output of the Request and Accordingly, we need to need to Display the Output of the Status.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So with Help of Request Body and Response Body APIs Integration can be done.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Postman&lt;/strong&gt; is a great tool we can use for Checking if the APIs are Hitting the server Properly or Not.&lt;/p&gt;

&lt;p&gt;That's all we Generally use for API Integration.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>dotnet</category>
      <category>watercooler</category>
      <category>csharp</category>
    </item>
    <item>
      <title>Things an Intern Should Keep In Mind - Tips for Interns</title>
      <dc:creator>Nitish Prajapati</dc:creator>
      <pubDate>Thu, 10 Sep 2020 10:16:56 +0000</pubDate>
      <link>https://forem.com/nitishprajapati/things-an-intern-should-keep-in-mind-tips-for-interns-4jam</link>
      <guid>https://forem.com/nitishprajapati/things-an-intern-should-keep-in-mind-tips-for-interns-4jam</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Goals&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Student Starting Internship should be well aware of Technology in which He/She is Working.&lt;strong&gt;Awareness brings Clarity to work&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Skills&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Skills are most important for which he/she gains after an Internship. Skills are Money in Treasure which we use for Getting Job Done. Skills need to utilize at the Right Time and Right Place.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Be punctual&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Arrive on time, meet deadlines, and never be in a hurry to leave the office early. Punctuality will speak for your sincerity. Treat your short-term project as a fulltime job to build rapport.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Take initiative&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Seek more work. Approach your manager and tell him about the areas you want to work in. Pitch new ideas even without being asked and offer to help where you see a problem. Initiatives from interns are seen as a sign of confidence and eagerness.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Interns should not get confused about there Interest in Technologies whether He/She wants to become Web Developer, Web Designer, Android Developer, iOS Developer, System Administrator.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Interns should Read Out Articles Regarding specific Technology which helps them to Develop their Interest in the specific Area.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>startup</category>
      <category>career</category>
      <category>firstyearincode</category>
      <category>inthirtyseconds</category>
    </item>
    <item>
      <title>Start to .Net Technologies</title>
      <dc:creator>Nitish Prajapati</dc:creator>
      <pubDate>Thu, 10 Sep 2020 09:43:30 +0000</pubDate>
      <link>https://forem.com/nitishprajapati/start-to-net-technologies-1ebk</link>
      <guid>https://forem.com/nitishprajapati/start-to-net-technologies-1ebk</guid>
      <description>&lt;p&gt;Microsoft .Net Framework has been truly Better for Web Development.&lt;br&gt;
.Net Framework Includes LINQ,ASP.NET, ADO.NET, CLR(Common Language Runtime).&lt;br&gt;
C#:-&lt;br&gt;
C# is a general-purpose, multi-paradigm programming language encompassing strong typing, lexically scoped, imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines.&lt;br&gt;
Pros and Cons of C#:-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easier to learn than c++&lt;/li&gt;
&lt;li&gt;Easier to read code than c++&lt;/li&gt;
&lt;li&gt;More rapid and potentially less error-prone development than c++ or java (you have unsigned types, you have ref/out, you can make your own value types, you have other useful things that java omits which means you have less jumping through hoops, which means less unnecessary code complexity).&lt;/li&gt;
&lt;li&gt;All things are passed by reference except for value types, by default&lt;/li&gt;
&lt;li&gt;Garbage collector cleaning up objects once they're no longer used, so you don't have to manually track everything yourself
The program is compiled to native binaries optimized for the platform when it is run (and yet it ran slightly slower than c++ code).&lt;/li&gt;
&lt;li&gt;Easy to make multiple threads
Have a variety of means of suspending threads to wait for signals and such
lock(someObject) { code }, which is kind of like java's synchronized but can be used anywhere and requires an object.
P/Invoke is much easier to use than JNI - but we probably wouldn't use it since we want to be cross-platform
Has an excellent free IDE (visual c# express) - but on windows only (see cons).&lt;/li&gt;
&lt;li&gt;You can make value types, which are by default pass by value instead of pass by reference, by making a struct instead of a class.&lt;/li&gt;
&lt;li&gt;You have 'ref' and 'out' keywords which allow you to pass a reference to a parameter to a function, without meaning that the parameter must be assigned by the function before it returns. Essentially, ref/out allows the function to modify the variable being passed as the parameter, like passing a reference in c++.
Fairly cross-platform with mono, and/but mono is still improving
Has unsigned integers (so does c++, java doesn't)
If the program crashes, it pops up a dialog telling the user wherein the code and why (on windows) or writes a stack trace to the console (with mono if run with --debug).
Programs are compiled to .exe files, and don't need to be recompiled for other OSes - mono can directly run .NET exes.
Cons:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Uses more memory than c++&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Garbage collector using CPU cycles and memory - (but barely any, at least CPU time)
Some things don't work in mono - calling functions in some windows dlls which won't exist on Linux, mono implementation of windows forms need workarounds in code (but we probably won't use them)
Mono isn't perfect yet&lt;/li&gt;
&lt;li&gt;Have to use .net 2.0 for generics (among other things), 1.1. doesn't have them. Can't use anything newer than 2.0 because 3.0 and up drop support for Windows 98, ME, and maybe 2000.
Can't declare functions synchronized&lt;/li&gt;
&lt;li&gt;No good IDE on non-windows. Eclipse has a c# plugin but it might not support most of Eclipse's features.&lt;/li&gt;
&lt;li&gt;No pointers, but they're replaced by the ref and out parameters, so they're not needed much&lt;/li&gt;
&lt;li&gt;Calling methods via delegates are significantly slower than normal method calling (or function pointers in c++, presumably)
Requires the (correct version of the) .NET framework to be installed to run the program, which is several hour downloads on dialup.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;This is some Terms we should keep in Mind Before Starting for .NET Technology&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>csharp</category>
      <category>career</category>
    </item>
  </channel>
</rss>
