DCSIMG
C#,Miscellaneous - Gil Fink's Blog

Gil Fink's Blog

Fink about IT

News

Microsoft MVP

My Facebook Profile My Twitter Profile My Linkedin Profile

Locations of visitors to this page

Creative Commons License

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
© Copyright 2013 Gil Fink

Hebrew Articles

Index Pages

My OSS Projects

English Articles

Browse by Tags

All Tags » C# » Miscellaneous (RSS)
Error CS0029: Cannot implicitly convert type Using WSDL Tool
Error CS0029: Cannot implicitly convert type Using WSDL Tool Today I was asked by one of developers I work with to check an error he got after he generated a proxy class with the wsdl.exe tool from a third party wsdl he got. The error was generated in runtime when he tried to use the generated class and it was something like: Unable to generate a temporary class (result=1). error CS0029: Cannot implicitly convert type 'A' to 'A[]' After searching in the internet I found that there...
Quick Tip – Convert VB.NET to C# or C# to VB.NET
Quick Tip – Convert VB.NET to C# or C# to VB.NET There is a need sometimes to convert VB.NET files to C# or vice versa. There are two tools that I use in this process: Code Converter by Telerik – enables the convert of a given piece of code or multiple files. .net code converter – enables the convert of a given piece of code. There are also add-ins to Visual Studio that enables the convert between VB.NET to C# like C-Sharpener For VB but since I don’t have full projects to convert I prefer the above...
Back to Basics – Zip in .NET
Back to Basics – Zip in .NET In today’s post I’m going to share a problem I solved this week. The solution was to use the framework’s System.IO.Compression namespace and the GZipStream object. The Problem In my current project we save Xml data in our database. The field to save the data was of type varchar(6000). This way of saving the data raised a problem of big Xml data (over 8000 kb for every Xml data) which were saved in the database and for the long run could raise space and performance problems...
Back to Basics – How to Retrieve a Value Returned by a SP
Back to Basics – How to Retrieve a Value Returned by a SP In the following posts I’m going to describe basic tools which every developer needs to know. In today’s post I’m going to explain how to retrieve a value returned by a stored procedure . The Story Behind the Post During this week one of my colleagues asked me if it’s possible get a returned value of a stored procedure with the infrastructure I wrote to my current project. The question regarded a returning value and not output parameters which...
Building a Simple Iframe Custom Control
Building a Simple Iframe Custom Control In today’s post I’m going to explain how to build a simple custom control – in my case it’s going to be an Iframe custom control . What is an Iframe? Iframes are a web page elements that create an inline frame which contains another document or web page. Iframes load another html document within their <iframe> tags . I don’t recommend the use of Iframes because they are bad for search engine optimizations but sometimes it is proper to use them. Building...
Back to Basics – The Default Keyword in Generic Code
Back to Basics – The Default Keyword in Generic Code In the following posts I’m going to describe basic tools which every developer needs to know. In today’s post I’m going to explain what is the default keyword in generic code and how to use it. What is the Default Keyword? The default keyword has dual meaning since .Net framework 2.0 was published. The first meaning is inside the switch construct to inform the switch that if non of the cases is valid then the switch will go to the default block...
Invoking Generic Methods With Reflection
Invoking Generic Methods With Reflection A few days ago I answered a question in the ASP.NET forums concerning the issue of invoking generic methods with reflection . In this post I’m going to explain that issue. If generics or reflection are new to you you can read about them in the next MSDN links: Overview of Generics in the .NET Framework Reflection Overview Getting started You will need to create a new console application in order to make the example work. In the following examples I’m going...
Back to Basics – Nullable Value Type
Back to Basics – Nullable Value Type In the following posts I’m going to describe basic tools which every developer needs to know. In today’s post I’m going to explain what is a Nullable value type and how to use it in your code. What are Nullable Value Types? Nullable value types are an instances of the Nullable<T> struct. The nullable value type can hold the all the values that its underlining value type holds and a null value. The main reason for this type came from the use of databases...
Back to Basics – Cloning
Back to Basics – Cloning In the following posts I’m going to describe basic tools which every developer needs to know. In today’s post I’m going to explain what is cloning and how to implement cloning in your application. What is Cloning? Cloning is the ability to make an exact copy of an instance of a type. There are two known forms of cloning : Shallow copy – all the fields of the original object are being copied to the copied object and the two objects reference the same objects in the end of...
Enterprise Library And The Authenticode Issue
In the post I describe a problem that was encountered in the enterprise library assemblies. I also describe the ways to solve the problem....
Memory Leak And The IDisposable Pattern
In the post I describe a memory leak event that happened in a new release of a project. I explain in details the solution to the memory leak - the IDisposable pattern....