Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Mastering Visual Studio 2017
Mastering Visual Studio 2017

Mastering Visual Studio 2017: Build windows apps using WPF and UWP, accelerate cloud development with Azure, explore NuGet, and more

eBook
€22.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Table of content icon View table of contents Preview book icon Preview Book

Mastering Visual Studio 2017

What is New in C# 7.0?

C# is a simple, modern, object-oriented programming language with support for component-oriented programming. It constructs robust applications using automatic garbage collection of unused objects, proper exception handling, and type-safe design.

Along with Visual Studio 2017, Microsoft introduces the next version of C#, that is, C# 7.0, which provides several changes and new features for developers to build rapid and robust applications without spending more time on code.

In this chapter, we will learn about the following new features introduced in C# 7.0, guided through the code:

  • Local functions or nested functions
  • Literal improvements in C# 7.0
  • The new digit separators
  • Getting to know about pattern matching
  • The ref returns and locals
  • New changes to tuples
  • Changes to the throw expression
  • Changes to Expression-bodied members
  • New changes to the out variables...

Local functions or nested functions

C# 7.0, which comes with Visual Studio 2017, allows you to write local functions or nested functions. The local function provides you with the ability to declare methods/functions inside an already defined methods body. It has the same capability as normal methods, but it will be scoped to the method block where they are declared.

In earlier versions of C#, we needed to write the method bodies separately and then we needed to call one method from the other. Here is the old way to write a method called by another method:

     public static Person GetBloggerDetails() 
     { 
       return new Person 
       { 
         FirstName = "Kunal", 
         LastName = "Chowdhury", 
         Blogs = GetBlogs() 
       }; 
     } 
 
     private static List<string> GetBlogs() 
     { 
       return new List<string> { &quot...

Literal improvements in C# 7.0

There were two types of literals supported in C# prior to C# 7.0. They are decimal literals and hexadecimal literals. For example, 490 is a decimal literal, whereas 0x50A or 0X50A is a hexadecimal literal, equivalent to the decimal value 490. Please note that the prefixes 0x and 0X define the same thing.

Here's an example for you to easily understand how a hexadecimal literal is used in C#:

 
    class Program 
    { 
      static void Main(string[] args) 
      { 
        double height = 490; 
        double width = 1290; 
 
        double heightInHex = 0x1EA; // equivalent to decimal 490 
        double widthInHex = 0x50A; // equivalent to decimal 1290 
 
        Console.WriteLine("Height: " + heightInHex + " Width: " + widthInHex); 
      } 
    } 

Along with C# 7.0, Microsoft added more support to literals, and they...

The new digit separators

Digit separator is a new feature in C# 7.0. You can use _ (underscore) inside numeric literals as a digit separator. The purpose of it is none other than improving the readability of the value in code.

You can put a digit separator (_) wherever you want between digits. You can have multiple underscores (____) too. They will have no effect on the value. This is shown in the following code snippet:

    var decimalValue1 = 1_50_000; // better than 150000 
    var decimalValue2 = 25_91_50_000; // better than 259150000 
 
    // you can use multiple underscores too 
    var decimalValue3 = 25_91__50___000; // better than 259150000 

You can also add digit separators to a binary literal and/or hexadecimal literals:

    var binaryValue = 0b1010_1011_1100_1101_1110_1111; 
    var hexadecimalValue = 0xAB_C_0_D_EF_578; 
 

Please note that the following conventions...

Getting to know about pattern matching

Pattern matching is a new notion introduced in C# 7.0, which adds some power to the existing operators and statements. You can perform pattern matching on any data type and from that statement you can extract the value of that data type. There are two different types of pattern matching in C# 7.0:

  • The Is expression with pattern matching
  • Switch statements with pattern matching

The Is expression with pattern matching

In this type of pattern matching, it introduces a new pattern variable out of the expression, allowing you to extract the value of the type. It is similar to the out variable, but with a limited scope to the surroundings.

Let's look at an example. In the old method,...

The ref returns and locals

Since C# 1.0, the language has supported passing parameters to a method by reference using the ref, but there exists no mechanism to return a safe reference to stack or heap memory locations.

In C# 7.0, Microsoft has provided the option for developers to return values by reference and store them in local variables as a reference pointer.

Before going into an example of return by reference, let us first look at an example of how the return by value works with a pass by reference parameter. In the following example, the GetAsValue method accepts a third parameter of type integer as a reference, and returns a value to the callee, which gets stored in the local variable name:

    public static void DemoReturnAsValue() 
    { 
      var count = 0; 
      var index = 0; 
      string[] names = { "Kunal", "Manika", "Dwijen" };...

New changes to tuples

A tuple is a finite ordered list of elements. In C#, it's not a new thing, having been available since .NET Framework 4.0. It is useful when you want to return multiple values from a method without creating a separate class or collection to hold the data. Tuples are declared in the manner, Tuple<T1, T2, T3, ...> and are available under the System namespace.

By default, a tuple can hold up to eight value types, but you can extend it by adding the reference of System.Runtime.

Although this is useful when returning multiple values, you need to create an allocation for the System.Tuple<...> object. The following example demonstrates how to return multiple values using a tuple:

   public static Tuple<string, string> GetAuthor() 
   { 
     return new Tuple<string, string>("Kunal Chowdhury", 
                             ...

Changes to the throw expression

The earlier versions of C# had some limitations on throwing exceptions from certain places, which caused developers to write more code to validate and raise exceptions. In C# 7.0, those limitations have been removed to reduce the overload.

The Null Coalescing operator now allows you to throw an exception in the middle of the expression without explicitly checking for null:

    m_designation = designation ?? 
          throw new ArgumentNullException(designation); 

It is now possible to throw an exception from the Conditional operator too:

    m_department = department == null ?  
           throw new ArgumentNullException(department) :  
           department; 

C# 7.0 also allows you to throw an exception from expression-bodied member, as shown in the following code snippet:

    public void SetSalary(double salary) =>  
           throw new...

Changes to the expression-bodied members

In C# 6.0, Microsoft introduced the expression-bodied methods and properties, but these had a few limitations, which didn't allow us to use them in the constructors, destructors, and getters/setters of properties.

With C# 7.0, these limitations are no more, and you can now write them for single-liner constructors and destructors, as well as the getter and setter of a property. Here's how you can use them:

    public class Person 
    { 
      private string m_name; 
 
      // constructor 
      public Person() => Console.WriteLine("Constructor called"); 
 
      // destructor 
      ~Person() => Console.WriteLine("Destructor called"); 
 
      // getter/setter properties 
      public string Name 
      { 
        get => m_name; 
        set => m_name = value; 
      } 
    } 

When you run the...

New changes with the out variables

Currently in C#, we need to first declare a variable before we pass it as an out parameter to a method. You can use a var while declaration if you initialize them in the same line, but when you don't want to initialize explicitly, you must declare them, specifying the full type:

    // predeclaration of 'out' variable was mandatory 
    int result; // or, var result = 0; 
    string value = "125"; 
 
    int.TryParse(value, out result); 
 
    Console.WriteLine("The result is: " + result); 

In C# 7.0, the out variables can be declared right at the point where they are passed as an out parameter to a method. You can now directly write int.TryParse(value, out int result); and get the value of the out parameter, to use it in the scope of the enclosing block:

    static void Main(string[] args) 
    { 
      string...

Getting to know about deconstruction syntax

Deconstruction is a syntax to split a value into multiple parts and store those parts individually into new variables. For example, tuples that return multiple values. Let us take the following method as an example, which returns a tuple of two string variables, Title and Author (see the New changes to tuples section):

    public (string Title, string Author) GetBookDetails() 
    { 
       return (Title: "Mastering Visual Studio 2017",
Author: "Kunal Chowdhury"); }

Now, when you call the method GetBookDetails(), it will return a tuple. You can access its elements by calling the element name, as follows:

  var bookDetails = GetBookDetails(); // returns Tuple 
  Console.WriteLine("Title  : " + bookDetails.Title); 
  Console.WriteLine("Author : " + bookDetails.Author); 

In a...

Uses of the generalized async return types

Prior to C# 7.0, async methods had to return either void, Task, or Task<T>. As Task is a reference type, returning such an object from async methods can impact performance because it allocates an object into memory even though it returns a cached object or runs asynchronously.

To overcome this, C# 7.0 introduces the ValueTask type, which is set to prevent the allocation of a Task<T> object when the result of the async operation is already available. Using it, the async methods can return types other than Task, Task<T>, and void:

  public async ValueTask<long> GetValue() 
  { 
    return await Task.Run<long>(() => 5000); 
  } 

If you receive an error accessing ValueTask in C# 7.0, you must explicitly reference System.Threading.Tasks.Extensions from the NuGet package library. To install the package, either...

Summary

In this chapter, we have learned about the new features introduced in C# 7.0, along with the release of Visual Studio 2017. We have also demonstrated each of them with examples/code.

At a glance, we have learned about local or nested functions, literal improvements, the new digit separators, pattern matching, ref returns and locals, changes in tuples, changes to the throw expression, and expression-bodied members. We also learned about the new changes to the out variables, deconstruction syntax, and the uses of generalized async return types.

As we have become familiar with the features of C# 7.0, let's move on to the next chapter, where we will learn about building applications for Windows using Windows Presentation Foundation. We will also learn how to design a XAML UI, do data bindings, and much more.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Focus on coding with the new, improved, and powerful tools of VS 2017
  • Master improved debugging and unit testing support capabilities
  • Accelerate cloud development with the built-in Azure tools

Description

Visual Studio 2017 is the all-new IDE released by Microsoft for developers, targeting Microsoft and other platforms to build stunning Windows and web apps. Learning how to effectively use this technology can enhance your productivity while simplifying your most common tasks, allowing you more time to focus on your project. With this book, you will learn not only what VS2017 offers, but also what it takes to put it to work for your projects. Visual Studio 2017 is packed with improvements that increase productivity, and this book will get you started with the new features introduced in Visual Studio 2017 IDE and C# 7.0. Next, you will learn to use XAML tools to build classic WPF apps, and UWP tools to build apps targeting Windows 10. Later, you will learn about .NET Core and then explore NuGet, the package manager for the Microsoft development platform. Then, you will familiarize yourself with the debugging and live unit testing techniques that comes with the IDE. Finally, you'll adapt Microsoft's implementation of cloud computing with Azure, and the Visual Studio integration with Source Control repositories.

Who is this book for?

.NET Developers who would like to master the new features of VS 2017, and would like to delve into newer areas such as cloud computing, would benefit from this book. Basic knowledge of previous versions of Visual Studio is assumed.

What you will learn

  • Learn what s new in the Visual Studio 2017 IDE, C# 7.0, and how it will help developers to improve their productivity
  • Learn the workloads and components of the new installation wizard and how to use the online and offline installer
  • Build stunning Windows apps using Windows Presentation Foundation (WPF) and Universal Windows Platform (UWP) tools
  • Get familiar with .NET Core and learn how to build apps targeting this new framework
  • Explore everything about NuGet packages
  • Debug and test your applications using Visual Studio 2017
  • Accelerate cloud development with Microsoft Azure
  • Integrate Visual Studio with most popular source control repositories, such as TFS and GitHub
Estimated delivery fee Deliver to Netherlands

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jul 27, 2017
Length: 466 pages
Edition : 1st
Language : English
ISBN-13 : 9781787281905
Vendor :
Microsoft
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Estimated delivery fee Deliver to Netherlands

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Publication date : Jul 27, 2017
Length: 466 pages
Edition : 1st
Language : English
ISBN-13 : 9781787281905
Vendor :
Microsoft
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 143.97
C# 7 and .NET Core Cookbook
€41.99
Mastering Visual Studio 2017
€41.99
C# 7.1 and .NET Core 2.0 ??? Modern Cross-Platform Development
€59.99
Total 143.97 Stars icon

Table of Contents

10 Chapters
What is New in Visual Studio 2017 IDE? Chevron down icon Chevron up icon
What is New in C# 7.0? Chevron down icon Chevron up icon
Building Applications for Windows Using XAML Tools Chevron down icon Chevron up icon
Building Applications for Windows 10 Using UWP Tools Chevron down icon Chevron up icon
Building Applications with .NET Core Chevron down icon Chevron up icon
Managing NuGet Packages Chevron down icon Chevron up icon
Debugging Applications with Visual Studio 2017 Chevron down icon Chevron up icon
Live Unit Testing with Visual Studio 2017 Chevron down icon Chevron up icon
Accelerate Cloud Development with Microsoft Azure Chevron down icon Chevron up icon
Working with Source Controls Chevron down icon Chevron up icon

Customer reviews

Most Recent
Rating distribution
Full star icon Full star icon Half star icon Empty star icon Empty star icon 2.9
(7 Ratings)
5 star 28.6%
4 star 0%
3 star 28.6%
2 star 14.3%
1 star 28.6%
Filter icon Filter
Most Recent

Filter reviews by




DHG Mar 08, 2019
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
I get the book and it requires that you download material from their website. Except the website requires that you register. Except that the registration process is broken and you are supposed to email them. Except the email address returns your email with a notice that the address is not recognized.Sound like a load of crap?The books has some good stuff, but I am going to be loading a bunch of code by hand.Not nice.
Amazon Verified review Amazon
Amazon Customer Feb 12, 2019
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
Very hard to follow. Author jumps into confusing examples immediately. He reviews VS 2017 new features and does not prompt beginners to walk through the examples in VS. Maybe it is the difficult syntax and structure of XAML, but he throws terminology like namespaces and classes right away at the novice almost from the beginning. Best to go to Google and search on "WPF tutorial for beginners" rather than waste money on the Kindle for this publication.
Amazon Verified review Amazon
JP Georgia Sep 06, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
A great, detailed tutorial about the premier software development tool. The book covers what every developer needs to know about Visual Studio. If the cost of VS daunts you, get the community version. It has all the features of Enterprise, including compile and distribute, and up to 5 developers can use it.
Amazon Verified review Amazon
John Cantrell Jan 19, 2018
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
Still working through this text..
Amazon Verified review Amazon
Ben B Nov 20, 2017
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
Very advanced for a beginner, have not got far in it!
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela