Skip to content
Winston Lee

Winston Lee

  • Home
  • Blog
Winston Lee
Winston Lee

C Sharp

C Sharp | Development

Difference between LINQ and lambda expression

I have stuck at this field for a long time. Today it suddenly becomes clear to me: LINQ and lambda expressions are to very different things (though they complements each other on many occasions). Lambda expression Lambda expression, to sum…

Read More Difference between LINQ and lambda expressionContinue

C Sharp | Development

Note on capturing value of a variable in an anonymous function

Extraction from “C# programming language 4th edition” When not captured, there is no way to observe exactly how often a local variable is instan-tiated: Because the lifetimes of the instantiations are disjoint, it is possible for each instantiation to simply…

Read More Note on capturing value of a variable in an anonymous functionContinue

C Sharp | C++ | Windows

Calling C# from C++

Most of the post on the internet about interoperability is the other way around (Calling C++ from C#) since C# is apparently the superior language in terms of developer friendliness. But a part of research work is to make weird…

Read More Calling C# from C++Continue

C Sharp | Desktop | Windows

Management task: Remote shutdown utility

I run a simple web server to serve as a storage medium for my mobile devices (I don’t like using dropbox or other online storage solutions because they don’t offer much space and they hogs up bandwidth unnecessarily). Before I go…

Read More Management task: Remote shutdown utilityContinue

C Sharp | Development

How to cope with designer errors in Visual Studio

From time to time, when you have some errors in your controls, Visual may just stop responding altogether and forces you to restart without any indicator on what happened and how to fix it. To overcome this, there is two…

Read More How to cope with designer errors in Visual StudioContinue

C Sharp

Fetching data from the web with C#, the easy way (1-liner)

I don’t know why the top results from Google always involve more than 10 lines of code and loads of comments when actually you can just do this: byte[] Data = new WebClient().DownloadData(FrameURL); You can try DownloadString and DownloadFile based…

Read More Fetching data from the web with C#, the easy way (1-liner)Continue

C Sharp | Desktop

(Very) crude .NET wrapper for Tesseract 3

I was searching for a quick way to recognize license plates and stumbled upon EmguCV’s sample code. But this code requires Tesseract OCR (An open source OCR engine currently sponsored by Google) and its .NET wrapper. Unfortunately, this code was…

Read More (Very) crude .NET wrapper for Tesseract 3Continue

C Sharp | C++ | Development

Why specifying the call type when performing P/Invoke is important

I was working on a C# project that required interaction between unmanaged and managed code. It’s nothing complex, just calling various functions in a DLL through a wrapper class, then I hit this exception: Strange thing is, this “stack unbalanced”…

Read More Why specifying the call type when performing P/Invoke is importantContinue

C Sharp | Development

Remove empty lines in Visual Studio

This will remove empty lines and lines with blank characters (space, tab, …) only

Read More Remove empty lines in Visual StudioContinue

C Sharp | Development | Web

Load data into controls in asp.net

Usually when working on windows form, I use this to do the work DropDownList1.DataSource = new ApplicationTableAdapter().GetDataBySystemID(1); DropDownList1.DataTextField = “Name”; DropDownList1.DataValueField = “ID”; But surprisingly, when switched to ASP.NET, the above code no longer works, at first I thought it…

Read More Load data into controls in asp.netContinue

Page navigation

1 2 Next PageNext

I’m an English / Vietnamese / Korean speaking software solution provider living in Korea

Get In Touch

To reach me, please use the contact form

Scroll to top
  • Home
  • Blog