Full Trust European Hosting

BLOG about Full Trust Hosting and Its Technology - Dedicated to European Windows Hosting Customer

European Visual Studio 2017 Hosting - HostForLIFE.eu :: Visual Studio Short Keys And Tips

clock March 22, 2019 11:01 by author Peter

Every developer who uses Visual Studio should know or be familiar with the shortcuts which I am going to share here. I hope it will be helpful to the freshers and even the experienced software developer friends.

Visual Studio Shortcut Keys and Tips

  1. Every developer should learn the difference between the concept of running an application in normal mode and in debug mode. Most of the freshers do not know this concept and run the application using F5 or clicking the RUN button in the menu bar of Visual Studio. But when it comes to the performance of Visual Studio and speed, we should know that F5 is used for running the application in debugging mode and for running the application without debugging, it is Ctrl+F5.

    So, in simple words, if the developer wants to start the application in debugging mode, press F5; otherwise press Ctrl+F5.
  2. To put the breakpoints in the code use F9. For this, we have to put the control at the specific line of code and press F9. Debugging is basically used to check the result or see the values which is coming as per expectation. Now if we run the application the control will come to that specific control and then we can see whether the values are coming as per our expectation or not. If it is the method then we have the concept of step in and step out. We use step in  to get into that specific method and to inspect the values in the method; for this we use F11. Step Out is used to see the output of the method, and the F10 key is used.
  3. As a developer, it is very important to write the code in proper format but most of the developers do not follow it (laughing) as their mind and soul waits to complete the task or module. But after some time of development of the code, they feel that the code should be formatted properly for the sake of better understanding and to troubleshoot (i.e debugging). For that purpose Visual Studio has a formatting concept through which we can format the document. To format the document we can use Ctrl+K,d.
  4. Sometimes, we write code which is not used at present but maybe it will  be needed for some other cases or for some specific attribute afterward for any specific conditions. We can comment the code by using Ctrl+K, C which will comment on the selected code.
  5. To remove a comment for the specific code, we can use Ctrl+K, U in Visual Studio.

Hope these small and useful tips will help you guys. I will provide more shortcuts for developers in the next blog.

 



Windows Server 2016 SSD Hosting - HostForLIFE.eu :: Server And Service Health Check And IP Capture For Bulk Servers

clock March 14, 2019 11:40 by author Peter

This Script will help in checking the below basic functionalities of the Bulk Servers. It will do so during Migration, Patch and Monthly Restart activities

This Script is added with the below functionalities, 

  1. IP Capture -- >Collects the DNSHostName,Description,DHCPEnabled,IPAddress,IpSubnet,DefaultIPGateway,MACAddress,DNSServerSearchOrder for all Enabled and IP Discovered NICs
  2. Services Status -- >It checks all the Services Automatic set and not Stopped services and provides the output.
  3. Server Status –- >Checks the Servers reachability and provides the output on screen
  4. Server Shutdown/Reboot -- >Checks the server status and perform Bulk Shutdown / Restart at once with Event Description Keyed.

Output Samples



European Visual Studio 2017 Hosting - HostForLIFE.eu :: How To Organize Classes Using Namespaces?

clock February 13, 2019 10:23 by author Peter

Today, in this article, we shall see what namespace actually does and how to organize the classes using namespaces. We use namespaces to organize classes into a logically related hierarchy. Namespaces function as both an internal system for organizing our application and an external way to avoid name collision between source code and application. Because more than one company may create a class with the same name, such as Employee, when we create code, that may be seen or used by third parties. It’s highly recommended that we shall organize our classes by using a hierarchy of namespaces. By practising this, we can avoid interoperability issues on application.

To create a namespace, we simply type a keyword namespace followed by the name. It is recommended to use Pascal case for namespaces.

It is also recommended that you create at least two-tiered namespaces, which is one that contains two levels of classification, separated by a period.

Let us see sample example of a two-tiered namespace.

namespace Infosys.Sales {  
    //define your classes within the namespace  
    public class customer() {}  
}   

Above two-tiered namespace declaration is identical to writing each namespace in nested format, as shown in the following code. 

 

namespace CompanyName {  
    namespace Sales {  
        public class Customer() {}  
    }  
}   

In both cases, we refer to class by using the following code.

CompanyName.Sales.Customer();   

Note

We should avoid creating a class with the same name as namespace.

Commonly used namespaces in .NET Framework
Microsoft .NET Framework is made of many namespaces, the most important one being System. The System namespace contains classes that most of the applications use to interact with operating system.

For example, the system namespace contains the console class which provides several methods, including WriteLine, which is a command that enables us to write code to an on-screen console.

We can access WriteLine method of console as follows.

System.Console.WriteLine("Prem Kumar Rathrola");   

A few of other namespaces that are provided by .NET Framework through the system namespace are listed below. 

  • System.Windows.Forms
    Provides the classes that are useful for building applications based on windows. 
  • System.IO
    Provides classes for reading and writing data to files

  • System.Data
    Provides classes that are useful for data access

  • System.Web
    Provides classes that are useful for building web forms applications


Europe SQL 2017 Hosting - HostForLIFE.eu :: Delete Duplicate Rows From a Table in MSSQL 2017

clock January 24, 2019 10:34 by author Peter

For every table, we tend to use a primary key or distinctive key for distinct values, however generally we'll encounter a problem with duplicate records. it's a significant issue with duplicate rows. thus we want to delete duplicate records to resolve it. So here i'll make an example to explain delete duplicate rows in MSSQL 2017 Hosting.

Example:
First we create a simple database with one table for membership that contains: a Member's ID, Membership type, Firstname,  Lastname and Birthday:
CREATE TABLE [dbo].[Membership](
[MemberID] [varchar](20) NOT NULL,
[MemberType] [int] NOT NULL,
[Firstname] [varchar](80) NOT NULL,
[Lastname] [varchar](80) NOT NULL,
[Birthday] [date] NOT NULL
) ON [PRIMARY]

Now, insert the following rows into this table:

INSERT INTO dbo.Membership (MemberID, Firstname, Lastname, MemberType, Birthday) VALUES
('001', 'Peter', 'Smith', 1, convert(datetime, '05/23/1988', 0))
INSERT INTO dbo.Membership (MemberID, Firstname, Lastname, MemberType, Birthday) VALUES
('002', 'Scott', 'Davidson', 1, convert(datetime, '07/10/1983', 0))
INSERT INTO dbo.Membership (MemberID, Firstname, Lastname, MemberType, Birthday) VALUES
('002', 'Scott', 'Davidson', 1, convert(datetime, '07/10/1983', 0))

INSERT INTO dbo.Membership (MemberID, Firstname, Lastname, MemberType, Birthday) VALUES
('003', 'Kevin', 'Richard', 1, convert(datetime, '04/24/1985', 0))

We currently have duplicated Scott Davidson’s entry (MemberID 2), with no clearly safe method of removing the duplicate, whereas leaving at least one entry intact. Now, imagine if you had a complete databse of information with a whole lot or thousands of duplicates. Fixing this by hand quickly becomes an impossible task!

To solve this, first we can add an column using the IDENTITY keyword so we currently have a unique method of addressing every row:
ALTER TABLE dbo.Membership ADD AUTOID INT IDENTITY(1,1)

We can then we can use:
SELECT * FROM dbo.Membership WHERE AUTOID NOT IN (SELECT MIN(AUTOID) _
FROM dbo.Membership GROUP BY MemberID)

Which will properly choose all duplicated records in our database (always worth checking before running the delete query!).  Once we are happy this is working for us, we can then run the delete query:

DELETE FROM dbo.Membership WHERE AUTOID NOT IN (SELECT MIN(AUTOID) _
FROM dbo.Membership GROUP BY MemberID)



Windows Hosting Europe - HostForLIFE.eu :: How To Use ServerSide Processing With jQuery Datatable?

clock January 15, 2019 10:37 by author Peter

What is the benefits of using  ServerSide Processing with JQuery Datatable? I personally found two important benefits of using ServerSide Processing with Datatable. We can handle more data using JQuery Datatable. Data can load quickly from the Database server .

Follow the following steps to use ServerSide processing with Datatable.

Step 1
Add JQuery  Js file  ,and Jquery Datatable css and Js file as shown in the below figure.

Add the following script to your .aspx page.
<!-- DataTables CSS --> 
<link rel="stylesheet" type="text/css" href="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/css/jquery.dataTables.css"> 

<!—jQuery Js --> 
<script type="text/javascript" charset="utf8" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js"></script> 

<!-- DataTables  JQuery file--> 
<script type="text/javascript" charset="utf8" src="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js"></script> 


Step 2
Create one WebService to Getdata (Here I am using asp.net WebService to get data). You can see  my Solution Explorer . I have two web pages and one service, and the name of the service is webService.asmx.

 

Step 3
Create method inside service which will return data to bind Jquery Datatable.
[WebMethod] 
    public void HelloWorld() 
    { 
        List<MyClass> lst = new List<MyClass>(); 
        int i = 0; 
        while (i < 10000) 
        { 
            lst.Add(new MyClass() { Empid = "1", Name = "Ar"}); 
            lst.Add(new MyClass() { Empid = "2", Name = "Br" }); 
            lst.Add(new MyClass() { Empid = "3", Name = "Cr" }); 
            i = i + 1; 
        } 
       var mydata=new DataTable() 
       { 
       aaData=lst,iTotalDisplayRecords=lst.Count,iTotalRecords=lst.Count 
       }; 
        JavaScriptSerializer js=new JavaScriptSerializer(); 
        js.MaxJsonLength = int.MaxValue; 
      Context.Response.Write(js.Serialize(mydata)); 
     
 } 


In the above code you can see that I have defined one function named HelloWorld. editsInside the HelloWorld function I have used three classes.These three classes are MyClass, DataTable and JavaScriptSerializer. Now defined the MyClass inside the service class as I have defined below.

public class MyClass 

    public string Empid { get; set; } 
    public string Name { get; set; } 


Now define the second class DataTable as I have defined below.
public class DataTable 

    public int iTotalRecords { get; set; } 
    public int iTotalDisplayRecords { get; set; } 
    public List<MyClass> aaData { get; set; } 


JavaScriptSerializer class is  available inside System.Web.Script.Serialization namespace.Add this namespace to your service class.

Step4
Design Table from the following code.
<table id="example" class="display" width="100%" cellspacing="0"> 
 
<thead> 
    <tr> 
        <th >Employee Id</th> 
        <th >Name</th> 
         
    </tr> 
    
</thead> 
</table> 

Step 5
Now use Ajax to call Service method and bind data to Jquery Datatable as shown in the below code.
<script> 

$(document).ready(function () 


example').dataTable({ 
"bProcessing": true, 
"sAjaxSource": "WebService.asmx/HelloWorld", 
"sServerMethod": "post", 
"aoColumns": [ 

               { mData: 'Empid' }, 
               { mData: 'Name' },  
           
          ] 

                });    

                    ); 
</script> 


Step 6
Now run your application and see the result.



DotNetNuke Hosting - HostForLIFE.eu :: Changing Default DotNetNuke Text Editor

clock January 8, 2019 11:18 by author Peter

Maybe you're wondering after done an upgrade to a newer version in Dotnetnuke (DNN), your text rich editor is still on the old version. In this tutorial, I will show you how you can switch between the old and the new text editor quickly. 

To change the default text editor provider of your website is pretty easy. To do it, just open your web.config file located on your root folder. Then, look for the following words:

Below is the full sample text grabbed from the web.config file.

<htmleditor defaultprovider="DotNetNuke.RadEditorProvider">
    <providers>
    <add name="TelerikEditorProvider" type="DotNetNuke.HtmlEditor.TelerikEditorProvider.EditorProvider, DotNetNuke.HtmlEditor.TelerikEditorProvider" providerpath="~/Providers/HtmlEditorProviders/Telerik/" toolsfile="~/Providers/HtmlEditorProviders/Telerik/Config/ToolsDefault.xml" configfile="~/Providers/HtmlEditorProviders/Telerik/Config/ConfigDefault.xml" filterhostextensions="True"></add>

    <add name="DotNetNuke.RadEditorProvider" type="DotNetNuke.Providers.RadEditorProvider.EditorProvider, DotNetNuke.RadEditorProvider" providerpath="~/DesktopModules/Admin/RadEditorProvider"></add>

    </providers>
</htmleditor>

If you want to switch around between TelerikEditorProvider or DotNetNuke.RadEditorProvider, uou just need to specify the name of the provider and place the default html provider name in the orange background location like this:

htmleditor defaultprovider="DotNetNuke.RadEditorProvider"

HostForLIFE.eu DotNetNuke 7.4 Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes. We have customers from around the globe, spread across every continent. We serve the hosting needs of the business and professional, government and nonprofit, entertainment and personal use market segments.



WCF Hosting UK - HostForLIFE.eu :: Optional Parameters In WCF Service URI Template

clock December 21, 2018 10:09 by author Peter
WebGet(UriTemplate = "TestMessage/{p1}?firstname={firstname}&lastname={lastname}", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Xml)]  
[OperationContract]  
string TestMessage(string message, string firstname = "", string lastname = ""); 

Whereas TestMessage is my service name and p1 parameter is compulsory whereas firstname and lastname parameters are optional but u have to specify in the URI Template but keep one thing in mind while declaring the parameters as optional u have to first preceed them with ? and then parameter name and then use & to assign the second parameter as option as per your requirement. If u see in the function declaration also i have used the optional parameter feature of .Net 4.0

Step 2 - Function Definition

public string TestMessage(string message,string firstname="",string lastname="")  
{  
   string responsedata = string.Empty;   
   responsedata = message + "" + "FirstName: " + firstname + "" + "LastName: " + lastname;  
   return responsedata;  
}  

Note
How to call the Service,

Input1
http://localhost:49785/Service.svc/parameter1

Output1 - parameter1 Firstname: LastName

In the above output, only parameter1 will be returned as u didnot specify the other 2 parameters so they will get their value as "Empty"

Input2

http://localhost:49785/Service.svc/parameter1?firstname=peter&lastname=scott

Output2 - parameter1 Firstname:kamal LastName:rawat

so u will see in the above output u passed both the parameters so you got all the values.

Input2

http://localhost:49785/Service.svc/parameter1?firstname=peter

Output2 - parameter1 Firstname:kamal LastName:
In the above output parameter1 is passed i.e firstname=peter but you wont get lastname parameter, because you didn't pass and its optional if u dont pass the parameter value and will take value as empty.

HostForLIFE.eu European WCF Hosting

HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes. We have customers from around the globe, spread across every continent. We serve the hosting needs of the business and professional, government and nonprofit, entertainment and personal use market segments.



Windows Server 2016 SSD Hosting - HostForLIFE.eu :: Dedicated Server Vs VPS For Game Hosting

clock December 14, 2018 10:28 by author Peter

There are many different types of servers, each with its own strengths and use cases. Dedicated servers and virtual private servers are the most popular in the game hosting world, but which is right for you?

Both provide a complete server environment on which you can run any software, including games. From the perspective of the user, dedicated servers and virtual private servers are similar, but which you choose depends on the requirements of the games and the number of players you intend to host.

Dedicated Server

A dedicated server is a physical computer in a data center. When you run software on a dedicated server, it runs on the “bare metal”. The full resources of the physical machine are available to the user and any software they run.

Virtual Private Server

A VPS is a virtual machine. You can think of it as a simulated server running in software — a hypervisor — on a dedicated server. That makes virtual servers flexible: they can be resized or moved to a different physical server.

Server hosting providers run many virtual private servers on a single dedicated server, each of which gets a slice of the server’s resources: RAM, storage, CPU, network bandwidth. When you lease a virtual server, you choose how big that slice is.

VPS hosts often oversell virtual servers, allocating more resources than the underlying physical server has in the hope that clients won’t need all of the allotted resources at the same time. Games need all the resources they can get, so overselling can cause contention and performance issues that affect gameplay.

Dedicated servers have resource limits too, but those limits are clearly displayed when the server is leased. Server hosting providers can’t oversell dedicated servers (although they might oversell network connectivity).

How To Choose A Game Server

Most games that can be self-hosted provide guidelines about the server resources they need. Check the requirements to make sure the server you choose is capable of running the game with the number of players you expect to host.

Add-ons, modules, and expansion packs can increase the amount of RAM and storage you need, so be sure to take that into account.

Cheap VPS

A low-powered cheap virtual private server won’t cut it. Inexpensive virtual servers — think $5-$10 — allocate minimal processing power and RAM. They don’t provide the resources needed by even a simple game.

For example, Minecraft requires a minimum of 2GB of RAM. The cheapest VPS game servers provide 1GB or less. With 2 GB, a VPS can support 1 - 4 players with acceptable performance. More than five players requires 3 GB and more than 10 requires 8 GB.

High-Powered VPS

Some VPS providers offer higher-powered virtual private servers with sufficient resources to host games. They are often marketed as hybrid servers: fewer virtual servers are hosted on the same dedicated servers and each server has more resources.

Hybrid servers can provide decent performance as a moderately busy game server. They are less expensive than dedicated servers, but the prices of the most powerful hybrid servers are in-line with similarly specified dedicated servers.

Dedicated Servers

Dedicated servers offer the best game performance. They range from moderately powerful machines ideal for small personal game servers with a handful of users to the most powerful single-chassis machines available.

A top-tier dedicated server may have multiple processors with dozens of cores, hundreds of gigabytes of RAM, and several terabytes of storage. They are capable of hosting hundreds of concurrent users without breaking a sweat.

You can expect to pay under $100 per month for a low-end dedicated server more powerful and reliable than most VPS’s on the market. For a top-tier dedicated server, you will pay in excess of $1000 per month.

A Word On Networking

Network performance is just as important as server performance. The most powerful dedicated server provides a poor gaming experience if it is hosted on a high-latency network.

Most hosting providers advertise the bandwidth they provide with each server: the amount of data the client can transfer in and out of the provider’s network. That is important, but make sure that the network is also optimized for low latencies (often referred to as ping rates by gamers).

In Conclusion

Your choice of a game server should take several factors into account,

  • The resource requirements of the games you intend to host
  • The number of concurrent users
  • Your budget

Generally speaking, a dedicated server is the best solution but a high-end virtual private server might be good enough, depending on the game and the number of users.



European Visual Studio 2017 Hosting - HostForLIFE.eu :: Shortcuts For Debugging In Visual Studio

clock November 28, 2018 10:06 by author Peter

Debugging is one of the most important aspect of programming. It is crucial to successful software development, but even many experienced programmers find it challenging. With the help of keyboard shortcuts , it can be made faster. So here is the list of all shortcut keys available in visual studio for debugging.

Debugging Shortcuts in Visual Studio
 

Shortcut

Description

Ctrl-Alt-V, A Displays the Auto window to view the values of variables currently in the scope of the current line of execution within the current procedure
Ctrl-Alt-Break Temporarily stops execution of all processes in a debugging session. Available only in run mode
Ctrl-Alt-B Displays the Breakpoints dialog, where you can add and modify breakpoints
Ctrl-Alt-C Displays the Call Stack window to display a list of all active procedures or stack frames for the current thread of execution. Available only in break mode
Ctrl-Shift-F9 Clears all of the breakpoints in the project
Ctrl-Alt-D Displays the Disassembly window
Ctrl-F9 Enables or disables the breakpoint on the current line of code. The line must already havek a breakpoint for this to work
Ctrl-Alt-E Displays the Exceptions dialog
Ctrl-Alt-I Displays the Immediate window, where you can evaluate expressions and execute individual commands
Ctrl-Alt-V, L Displays the Locals window to view the variables and their values for the currently selected procedure in the stack frame
Ctrl-Alt-M, 1 Displays the Memory 1 window to view memory in the process being debugged. This is particularly useful when you do not have debugging symbols available for the code you are looking at. It is also helpful for looking at large buffers, strings, and other data that does not display clearly in the Watch or Variables window
Ctrl-Alt-M, 2 Displays the Memory 2 window
Ctrl-Alt-M, 3 Displays the Memory 3 window
Ctrl-Alt-M, 4 Displays the Memory 4 window
Ctrl-Alt-U Displays the Modules window, which allows you to view the .dll or .exe files loaded by the program. In multiprocess debugging, you can right-click and select Show Modules for all programs
Ctrl-B Opens the New Breakpoint dialog
Ctrl-Alt-Q Displays the Quick Watch dialog with the current value of the selected expression. Available only in break mode. Use this command to check the current value of a variable, property, or other expression for which you have not defined a watch expression
Ctrl-Alt-G Displays the Registers window, which displays CPU register contents
Ctrl-Shift-F5 Terminates the current debugging session, rebuilds if necessary, and then starts a new debugging session. Available in break and run modes
Ctrl-Alt-N Displays the Running Documents window that displays the set of HTML documents that you are in the process of debugging. Available in break and run modes
Ctrl-F10 Starts or resumes execution of your code and then halts execution when it reaches the selected statement. This starts the debugger if it is not already running
Ctrl-Shift-F10 Sets the execution point to the line of code you choose
Alt-NUM * Highlights the next statement to be executed
F5 If not currently debugging, this runs the startup project or projects and attaches the debugger. If in break mode, this allows execution to continue (i.e., it returns to run mode).
Ctrl-F5 Runs the code without invoking the debugger. For console applications, this also arranges for the console window to stay open with a “Press any key to continue” prompt when the program finishes
F11 Executes code one statement at a time, tracing execution into function calls
Shift-F11 Executes the remaining lines of a function in which the current execution point lies
F10 Executes the next line of code but does not step into any function calls
Shift-F5 Available in break and run modes, this terminates the debugging session
Ctrl-Alt-V, T Displays the This window, which allows you to view the data members of the object associated with the current method
Ctrl-Alt-H Displays the Threads window to view all of the threads for the current process
F9 Sets or removes a breakpoint at the current line
Ctrl-F11 Displays the disassembly information for the current source file. Available only in break mode
Ctrl-Alt-W, 1 Displays the Watch 1 window to view the values of variables or watch expressions
Ctrl-Alt-W, 2 Displays the Watch 2 window
Ctrl-Alt-W, 3 Displays the Watch 3 window
Ctrl-Alt-W, 4 Displays the Watch 4 window
Ctrl-Alt-P Displays the Processes dialog, which allows you to attach or detach the debugger to one or more running processes

 



European Visual Studio 2017 Hosting - HostForLIFE.eu :: Live Unit Testing With Visual Studio 2017

clock November 14, 2018 08:41 by author Peter

Visual Studio 2017 v15.3 or higher versions support Live Unit Testing. This feature executes the already-written test cases automatically as a programmer makes the code changes. Live Unit Testing helps a developer to do the following:

 

  • It executes all the impacted Test Cases as a programmer modifies the code and makes sure changes do not break Unit Test Cases.
  • Through the Visual Studio editor, the programmer sees the code coverage in a realistic view.
  • It also indicates which line is covered or not using Live Unit Testing.
  • Live Unit Testing is supported in  both .NET Framework and .NET Core.

Enabling
Live Unit Testing is only available in Visual Studio 2017 with the Enterprise edition. We can enable the Live Unit Testing by going to the following menus - Test > Live Unit Testing > Start.

After enabling the Live Unit Testing for a project, Live Unit Testing shows options as Start, Pause, Stop and Reset.

Configuration
The default configuration can be changed from the Visual Studio Menu Tool > Options > Live Unit Testing > General. We can configure the Live Unit Testing for the Battery and Memory usages, Testcase Timeout, and Logging Level can be set as needed.

Setup Project Solution

  • Open the Visual Studio 2017.
  • Create one Windows Library Project as “ClassLibrary1” and Change the “Class1.cs” to the “AreaCalculator.cs”.
  • Right click on the solution and add a Unit Test Project as “UnitTestProject1” and change the “UnitTest1.cs” to the “AreaCalculatorTest.cs”
  • Add the Reference of the “ClassLibrary1” project to the “UnitTestProject1”.
  • Add the using statement “using ClassLibrary1;” to the “AreaCalculatorTest.cs” in the using statement section.
  • Build the Solution.

Demo
Open the AreaCalculator.cs and add the code as per the below screenshot.
Open the AreaCalculatorTest.cs and paste the below code. I have not added the Test Method for the triangle’s area calculation and incorrectly calculated the Test Method of the square’s area, just to show some behavior of Live Unit Testing.

Replace the below code in the AreaCalculatorTest.cs file
Now start the Live Unit Testing from the Test menu, then an automatic background process triggers and we see an icon in-line with code. Description of each icon is mentioned here

  • Green Tick Mark represents that this Method is covered for the unit testing.
  • Cross Mark represents that this method is covered for the unit testing, but the test case failed during execution.
  • Blue Negative Mark represent that this method is not covered for the unit testing so a test case needs to be created.

Below screenshots represent each icon of the Live Unit Testing

Icon’s in AreaCalculator.cs


Icon’s in AreaCalculatorTest.cs


So, with the help of Live Unit Testing of Visual Studio, a developer will know about the impact of the changes he is making, and if it's covered for unit testing or not. This is an awesome feature of Visual Studio 2017



About HostForLIFE

HostForLIFE is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

We have offered the latest Windows 2019 Hosting, ASP.NET 5 Hosting, ASP.NET MVC 6 Hosting and SQL 2019 Hosting.


Tag cloud

Sign in