Category Archives: Software Developing

Postgresql – Functions

Next i present to you one of my implementions of postgresql function usage. Generally postgresql functions should be  something like stored procedures from MSSQL. From documenation you can see that the sintaxt is almost the same like MSSQL, but in my opinion it has more flexibility. I’ve tried to implement the insert, update, delete, select functions who will return a data table for C#. First you should create an table for testing purposes.

The function for insert is something like this:

For update the function looks like this:

For delete i use only a logical delete  using a flag. It can be modified in order to make …

Continue reading

Posted in Postgresql.

Cross Thread Utility

IF you want to update some information in windows form control from another thread please use the following class. 🙂 IF you receive the error : “Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on ….” use the following class. 🙂

This class can be used from .Net 3.5 version. How to use it:

I consider that is a good class, to use it in multi threaded aplications. Don’t forget to modify it as you want. 🙂

Posted in C#.

C# Operator Overloading

This is my first C# operator overloading implementation that can be used in many specific projects. The tutorial from MSDN it shows only a basic class that implements the operators. In this case the class presented on MSDN doesn’t have any usability, other than learning how to implement the operator overloading. Next i present you an class who can be used as is. 😀

Next i show you an usage . The code doesn’t need any comments – is simple. The variable info can be used like an string, and using the operator  “+” you can add byte array from any function who returns this kind of data. At …

Continue reading

Posted in C#.

Hex – Byte Class

The following class i’ve used in an fiscal printer implementation for my job. This static class only is a wraper for byte values.

Can be used as you want. For me it was very important to use it because it is much simpler to see the text other then the effective values. The usage of this class:

Enjoy and don’t forget to modify it as you want. 🙂  

Posted in C#.