↓ Skip to Main Content
Useful code Programming with VBA, C# and Python

Main Navigation

  • All
  • VBA
    • VBA Tools
    • VBA Online Resources
    • All VBA articles
  • Python
  • Else
    • C#
  • Reviews
    • List of reviews
  • YouTube
  • PayPal
  • About
Useful code Programming with VBA, C# and Python

Off Canvas Menu

  • All
  • VBA
    • VBA Tools
    • VBA Online Resources
    • All VBA articles
  • Python
  • Else
    • C#
  • Reviews
    • List of reviews
  • YouTube
  • PayPal
  • About

Category: C Sharp Tricks

Why do Java developers wear glasses?
Because they do not C#.

Home › Archive for C Sharp Tricks › Page 3
C# – Serialization and Deserialization of JSON
C Sharp Tricks

C# – Serialization and Deserialization of JSON

Vitosh Mar 5, 2017 Tagged with C#, deserialization, JSON

Whatever they tell you C# is somehow a fancy language. One of the reasons for this is that you may use the hard work of plenty of other good developers for free and without even thinking of how to make …

C# – Serialization and Deserialization of JSON Read more →

C# – simple example of interfaces
C Sharp Tricks

C# – simple example of interfaces

Vitosh Feb 28, 2017 Tagged with C#, interface

After the previous article here for simple example of inheritance, today I have decided to write something similar for interfaces. Pretty much, interfaces are something similar that objects implement. 🙂 E.g., if you have keyboard and a phone, they both …

C# – simple example of interfaces Read more →

C# – Simple example of inheritance
C Sharp Tricks

C# – Simple example of inheritance

Vitosh Feb 25, 2017 Tagged with C#, Inheritance C#

Reading the C# 6.0. book for which I am preparing a review made  me think that I do not post a lot of C#  code. Thus, I have decided to prepare a simple C# example of inheritance with overriding. Let’s see …

C# – Simple example of inheritance Read more →

C# – Greedy Algorithm from CodeForces
C Sharp Tricks

C# – Greedy Algorithm from CodeForces

Vitosh Feb 5, 2017 Tagged with C#, greedy algorithm, linkedList

One may write a few chapters in an algorithmic book for greedy algorithms. The funny part about them, is that there are a set of algorithmic problems, where the greedy solution tends to be the best one. What exactly is …

C# – Greedy Algorithm from CodeForces Read more →

C# – Algorithms – Find n-th divisor of an integer
C Sharp Tricks

C# – Algorithms – Find n-th divisor of an integer

Vitosh Feb 1, 2017 Tagged with algorithm, C#, divisor of integer

The Codeforces contests are sometimes more challenging than expected, even for the first problems, which are supposed to be trivial. Well, they are not that trivial. In the 762. edition, the 1. problem was concerning the n-th divisor of an …

C# – Algorithms – Find n-th divisor of an integer Read more →

C# – LINQ – Remove duplicates from a list and ignore values from another list
C Sharp Tricks

C# – LINQ – Remove duplicates from a list and ignore values from another list

Vitosh Jan 30, 2017 Tagged with C#, ignore list, ignore values, LINQ, remove duplicates

My idea for the blog was to post some articles every now and then. But at least, I am trying to keep up to a schedule of minimum 1 article per week, to keep it alive. Thus, I have decided …

C# – LINQ – Remove duplicates from a list and ignore values from another list Read more →

C# – Loop through Excel files and get data from them
C Sharp Tricks

C# – Loop through Excel files and get data from them

Vitosh Jan 23, 2017 Tagged with C#, loop through files

C# and .Net were actually thought as the technology that was going to exchange VBA and make it useless. Well, it did not happen because of many reasons, mainly because plenty of companies still use macros and noone has the …

C# – Loop through Excel files and get data from them Read more →

C# – LINQ – Example for LINQ initialization
C Sharp Tricks

C# – LINQ – Example for LINQ initialization

Vitosh Jan 23, 2017 Tagged with C#, LINQ

Lately I am interested in C# again and thus I have taken a deeper look at LINQ (Language Integrated Query). My previous article, concerning it was here. I thought it was interesting, that the value in LINQ is calculated after …

C# – LINQ – Example for LINQ initialization Read more →

C# – Loop through enum names in .Net
C Sharp Tricks

C# – Loop through enum names in .Net

Vitosh Jan 10, 2017 Tagged with C#, GetEnumNames

Ok, C# and .Net have features that people from the VBA world can only … dream about. In a way. I was recently taking a look at the Type.GetEnumNames()  function in .Net and I simply thought that it would be …

C# – Loop through enum names in .Net Read more →

C# – Some simple example for threads
C Sharp Tricks

C# – Some simple example for threads

Vitosh Jan 9, 2017 Tagged with C#, threads

The idea here is to show a little bit about parallel programming and the way I understand it – as far as I am mainly a VBA developer, I do not understand it, because Microsoft did not think that it …

C# – Some simple example for threads Read more →

Code Forces – New Year and North Pole – A problem much easier than initially thought
C Sharp Tricks

Code Forces – New Year and North Pole – A problem much easier than initially thought

Vitosh Jan 7, 2017 Tagged with Algorithms, C#, codeforces

In the new 2017 I have decided to take a new look at CodeForces and what do they bring us. After all, this is one of the very few “places” in the world, where you can compete with the world …

Code Forces – New Year and North Pole – A problem much easier than initially thought Read more →

VBA – Add a C# library to a VBA project – Part 2
C Sharp Tricks, VBA \ Excel

VBA – Add a C# library to a VBA project – Part 2

Vitosh Dec 16, 2016 Tagged with C#, C# library to a VBA project, VBA

After writing the simple part here I think that it is a really good idea to introduce IntelliSense as well 🙂 Something like this in the code:   And like this is in the library:   The question is always one …

VBA – Add a C# library to a VBA project – Part 2 Read more →

VBA – Add a C# library to a VBA project
C Sharp Tricks, VBA \ Excel

VBA – Add a C# library to a VBA project

Vitosh Dec 14, 2016 Tagged with C# library in VBA, foreign library VBA, VBA library

For today I was thinking to present an algorithmic problem, but somehow I have decided to show something more useful. It is a Step-by-step instruction for the creation of a C# object in VBA. You know, that references, which you …

VBA – Add a C# library to a VBA project Read more →

C# – Algorithms – Arpa’s hard exam and Mehrdad’s naive cheat
C Sharp Tricks

C# – Algorithms – Arpa’s hard exam and Mehrdad’s naive cheat

Vitosh Dec 7, 2016 Tagged with algorithm

As mentioned some times ago, whenever I am looking for a subject to post, the easiest way is to go to Codeforces.com and simply take a problem from the second division. If I manage to solve it from the first …

C# – Algorithms – Arpa’s hard exam and Mehrdad’s naive cheat Read more →

C# – Algorithms – Parade – CodeForces.com
C Sharp Tricks

C# – Algorithms – Parade – CodeForces.com

Vitosh Nov 24, 2016 Tagged with algorithm, C#, codeforces

CodeForces.com is really a nice place you can learn stuff. Learning by doing is probably what man actually needs in programming. Thus, I have taken the 2. Problem of the 2. Division in CodeForces, as far as it seemed interesting …

C# – Algorithms – Parade – CodeForces.com Read more →

C# – Algorithms – Grasshopper And the String – CodeForces.com
C Sharp Tricks

C# – Algorithms – Grasshopper And the String – CodeForces.com

Vitosh Nov 11, 2016 Tagged with Algorithms, C#, codefoces

Its Friday, the week is finally over and as far as I was planning to write an article per week or so, I have decided to write something. In these cases, when I do not have something prepared, I simply …

C# – Algorithms – Grasshopper And the String – CodeForces.com Read more →

Codeforces – Problem A – Checking the Calendar
C Sharp Tricks

Codeforces – Problem A – Checking the Calendar

Vitosh Oct 9, 2016 Tagged with Algorithms

Today I have not been very productive, after all it is Sunday and a person should relax. However, I have noticed the Intel Code Challenge in CodeForces, thus I have decided just to try the first problem. The problem seemed trivial, …

Codeforces – Problem A – Checking the Calendar Read more →

C# – CodeForces Round 368 – Problem 1
C Sharp Tricks

C# – CodeForces Round 368 – Problem 1

Vitosh Sep 12, 2016 Tagged with C#, CodeForces Round 368

I have not been blogging for a while, because I got a little deeper into reading the SQL books, which are waiting for review and thus I have decided to blog about something today. Initially, the idea was to write …

C# – CodeForces Round 368 – Problem 1 Read more →

C# – Code Forces 367 – Problem 1, Division 2
C Sharp Tricks

C# – Code Forces 367 – Problem 1, Division 2

Vitosh Aug 13, 2016 Tagged with Algorithms, C#

Today, on this sunny Saturday I have decided to code a bit in order not to feel guilty in the evening, when I go out. Or something like this. 🙂 I came across of probably the hardest problem, given in …

C# – Code Forces 367 – Problem 1, Division 2 Read more →

C# – Datagrid View – C# connect application to DB in Visual Studio
C Sharp Tricks

C# – Datagrid View – C# connect application to DB in Visual Studio

Vitosh Jul 27, 2016 Tagged with C#, c# connect app to db

Today I was looking a bit over SQL Server and Visual Studio and I have somehow liked the nice cooperation between these two. Thus, I have come up with the idea to build a simple application, just to demonstrate how …

C# – Datagrid View – C# connect application to DB in Visual Studio Read more →

C# – How Delegates Work
C Sharp Tricks

C# – How Delegates Work

Vitosh Jul 2, 2016 Tagged with C#, delegate c#, delegate list c#

Coding in C# is always fun, when you come from the VBA Excel world. There is much cool stuff, which you see and then you start wondering – why is this not implemented in VBA and why should I write …

C# – How Delegates Work Read more →

C# – Algorithm – Bear And Prime, Interactive Problem in CodeForces – Part 2
C Sharp Tricks

C# – Algorithm – Bear And Prime, Interactive Problem in CodeForces – Part 2

Vitosh Jun 12, 2016 Tagged with C#, Methods, Sieve of Eratosthenes

In Part 1 here I have shown the code that gives full points in the interactive CodeForces.Com problem for Bear And Prime.The trick is that writing hard-coded values in a code is really far away from a good practice in …

C# – Algorithm – Bear And Prime, Interactive Problem in CodeForces – Part 2 Read more →

C# – Algorithm – Bear And Prime, Interactive Problem in CodeForces
C Sharp Tricks

C# – Algorithm – Bear And Prime, Interactive Problem in CodeForces

Vitosh Jun 10, 2016 Tagged with C#, codeforces

On Wednesday I was participating in a round of the second division of Codeforces.Com and I managed to resolve 2 problems (1 completely, 1 not exactly completely :)). The third problem was written to be “interactive” and as far as …

C# – Algorithm – Bear And Prime, Interactive Problem in CodeForces Read more →

C# – Algorithms – Bear And Finding Criminals (from CodeForces)
C Sharp Tricks

C# – Algorithms – Bear And Finding Criminals (from CodeForces)

Vitosh Jun 10, 2016 Tagged with algorithm, C#

This Wednesday on 18:35 I did not have anything better to do than competing in codeforces.com. I have just finished work at 18:00 and I managed to get home before the start of the competition and even to get a sandwich …

C# – Algorithms – Bear And Finding Criminals (from CodeForces) Read more →

C# – Algorithms – Vanya and Label
C Sharp Tricks

C# – Algorithms – Vanya and Label

Vitosh Jun 6, 2016 Tagged with C#, codeforces, Vanya and Label

On Wednesday I have participated in a codeforces.com competition and it was not as quite successful as I wished it to be. I managed to solve 2 problems and 1 of them was “hacked”, which means 1 problem. Anyhow, I was …

C# – Algorithms – Vanya and Label Read more →

C# – Algorithm Solution for Vasya and String
C Sharp Tricks

C# – Algorithm Solution for Vasya and String

Vitosh May 28, 2016 Tagged with algorithm, C#

I have not solved algorithm problems in a while and thus, I have decided to take a look at the latest not difficult problems Codeforces.Com. I somehow liked the problem for Vasya And String as far as it seemed quite easy …

C# – Algorithm Solution for Vasya and String Read more →

C# – Unit Testing In C# – Fibonacci Example
C Sharp Tricks

C# – Unit Testing In C# – Fibonacci Example

Vitosh May 3, 2016 Tagged with C#, C# UnitTests, UnitTests

Unit testing is fun. Somehow. At least in C# 🙂 As far as I am making a living mainly as a VBA developer and I am taking a look at other technologies, I am always somehow jealous of how sufficient and …

C# – Unit Testing In C# – Fibonacci Example Read more →

C# – LINQ, ForEach, Classes, Override
C Sharp Tricks

C# – LINQ, ForEach, Classes, Override

Vitosh May 1, 2016 Tagged with C#, ForEach, LINQ

Some 2.5 years ago I have first written an article for LINQ, when I was learning it. Now, I was watching at some videos about algorithms and I realized I have not used LINQ in quite a while and I have …

C# – LINQ, ForEach, Classes, Override Read more →

C# – Three Algorithms For Fibonacci Numbers
C Sharp Tricks

C# – Three Algorithms For Fibonacci Numbers

Vitosh Apr 20, 2016 Tagged with C#, fibonacci, memoization, recursion

In the current article I have decided to show three ways of calculating the Fibonacci numbers in C#. The reason for this is, because Fibonacci is usually given as an example for recursion and it is probably the worst way to …

C# – Three Algorithms For Fibonacci Numbers Read more →

C# – Enable Migrations in Visual Studio using Entity Framework
C Sharp Tricks, EntityFramework

C# – Enable Migrations in Visual Studio using Entity Framework

Vitosh Jul 29, 2015 Tagged with Enable Migrations Visual Studio, Entity Framework

This article is rather small, but its target is to remind me how to enable migrations of database in Visual Studio. Thus, the steps are: Press Ctrl + Q to go to the quick launch. In the quick launch write …

C# – Enable Migrations in Visual Studio using Entity Framework Read more →

Posts pagination

Previous 1 2 3 4 5 Next

Copyright © 2026 VitoshAcademy