Skip to main content

Weather information and season images for your app using this beautiful plugin!

Weather Info! Have you ever wanted the weather info for your app without all of the httpclient stuff? You are in the right place.. I've got an amazing yet beautiful plugin for you! Let's Get Started! Open up a new project or use the project which you are currently working on.. Today I am going to use a console project. As always right click on the solution and click on manage nuget packages. Search for plugin.weather and install the first package.. Add the following namespaces to your file.. using Plugin.Weather; Let's First get the weather of current time using the city. For that use the following code. Weather weather = Api.GetWeatherByCity("City Name"); Now we can access all the weather information using the "weather" object. The below image shows the information which we can access using the weather object. Now I am going to write all the information to the console. You can also get the weather image url and save the image as Png/Jpg/Gif Format..   C

How to Create VCards using this amazing plugin!

How to Create VCards?




Introduction

What type of file does your phone saves when u create a contact?

Well, the answer is: It stores it in a file format called vcard. Where vcard stands for "Virtual Contact Card".

At the time of writing this article., there are not whole lot of nuget packages that can do this.

I have Created a nuget package that helps you to achieve it..

So, in this tutorial, we are going to create a vcard using C#.

Create a vcard using C#

Let's get started by creating a new project in visual studio for Mac. Please Note that this package also work for visual studio for windows too..


create a vcard using C#

Click on "new project" and select"Console Project" and click on next.


Give it a name and click on "Create"


Now right click on the solution and click on manage nuget packages.



Search for "VCards" and click on the third result.


Click on "Add Package" to install it in your project.

Then add the following namespaces to your project.

Clear The Code in the main class and add the following code to create a new Contact.
We have created the contact. Now let's get the vcard using the following code..

Now we have got the vcard as a string.
Let's write it into a file.
Make sure that the file extension is ".vcf"
So the full code on the main class looks like this.

Summary

In this article, we have got the knowledge of how to create a vcard using C#.
Please download my nuget package which is used in this article..
And Don't Forget to Subscribe to my Youtube channel!
Thank You!

Comments

  1. Replies
    1. Hi Sanjay..
      This is actually a nuget package.. A nuget package can be installed with a package manager.. It is used by many .Net developers... The Developers can install these packages into their own project and use it for their purpose.. Its just like how python has a package manager called as Pipi.. Say if I am working on an Xamarin project and I need to create VCard for my users and I don't have any idea on how to create it, I can just install this package an create it easily without any extra code!

      Delete
    2. Please take a look at this website..
      https://www.nuget.org/packages/VCard/

      Delete

Post a Comment

Popular posts from this blog

Weather information and season images for your app using this beautiful plugin!

Weather Info! Have you ever wanted the weather info for your app without all of the httpclient stuff? You are in the right place.. I've got an amazing yet beautiful plugin for you! Let's Get Started! Open up a new project or use the project which you are currently working on.. Today I am going to use a console project. As always right click on the solution and click on manage nuget packages. Search for plugin.weather and install the first package.. Add the following namespaces to your file.. using Plugin.Weather; Let's First get the weather of current time using the city. For that use the following code. Weather weather = Api.GetWeatherByCity("City Name"); Now we can access all the weather information using the "weather" object. The below image shows the information which we can access using the weather object. Now I am going to write all the information to the console. You can also get the weather image url and save the image as Png/Jpg/Gif Format..   C