Startsidan  ▸  Texter  ▸  Teknikblogg

Anders Hesselbom

Programmerare, skeptiker, sekulärhumanist, antirasist.
Författare till bok om C64 och senbliven lantis.
Röstar pirat.

Category: VB.NET

Om aktörer
2015-05-22

Det finns tre olika typer av aktörer i Akka .NET. Nedan använder jag en ReceiveActor som utmärker sig genom att den använder funktionen Receive för att ta emot ett meddelande. Exemplen som följer förutsätter att namnrymden Akka.Actor är inläst. Alla [...]

Fem nyheter i VB.NET 2015
2015-04-29

Nu när Visual Studio 2015 CTP finns att ladda hem, går det bra att testa vad som är nytt i senaste versionen av Visual Basic. Och i ärlighetens namn är det inte speciellt mycket som hänt i språket, men här är fem stycken guldkorn. Enterslag i strä [...]

Enkel trådning i .NET med Akka
2015-04-24

Historiskt sett har det varit ganska komplicerat att bygga multitrådade applikationer i .NET. Rent tekniskt var det enkelt att sjösätta en tråd med hjälp av klassen System.Threading.Thread, men om mycket skulle göras började koden ganska snabbt likna [...]

Five cool features in Visual Basic
2013-06-23

1. Case tests Test a value against a limit, a range or constants. 2. Typedefs Create custom names for any type. Demo: 3. Object templates Create an enumeration of any type. Demo: 4. Conditional exception handling Exce [...]

Processor information
2013-05-28

Beginners tend to ask how they can write a program that displays the processor model of a computer. There are a few different methods that can be used for this. You can call the SET command or you can query the registry. To call the SET command, conn [...]

What’s all this then?
2012-04-12

This might look strange to a C programmer: Dim I(10) As Integer Console.WriteLine(I.Length) Dim J(I.Length - 1) As Integer Console.Write(J.Length) This will give the output 11 and 11. The array named I has 11 elements because the last index (10) [...]

Non-related implicit type casting
2012-04-12

As always, I use Visual Basic in strict mode. I have this function that expects a Foo array: Sub DoSomething(X() As Foo) Console.WriteLine(X.Length) End Sub What I'm showing here is true for single variables too, but I am showing this using ar [...]

Stealing keys
2011-08-25

Events and everything you might need to develop a user control, will tell you about mouse and keyboard activity so that you can respond the user correctly. If you want to be able to catch arrow keys or tab, you must overload this function: Protect [...]

Extension methods in Visual Basic
2011-06-02

Extension methods is a well known concept in C#. The idea is that you can add methods to a type without inheritance, as described here. Visual Basic doesn't have any linguistic support for extension methods, but it can be done thanks to a method a [...]

Visual Basic: Importing namespaces
2011-05-07

In C# you can use the using directive to import the classes in a given namespace to your current scope. If you want to use the classes in System.Data.SqlClient, you could refer to them using their full path, like so: var r = new System.Data.SqlCli [...]

A multithreaded sockets server, just a few lines of code
2011-04-24

This small piece of Visual Basic code (VBx) shows how you can do a multithreaded sockets server in just a few lines of code. I write all of this code in a console application. The main module will only hold an implementation of the Main function. Lik [...]

Environment variables
2011-02-13

Assuming that you are running Windows 7, the environment variables can be manually accessed if you right click on Computer, and select Properties. From there, you click Advanced system settings and on the Advanced tab, you click the Environment varia [...]

Getting started with Silverlight in an existing web application
2010-09-25

To get things started, I will show how to enhance a web application with a Silverlight object, and how to pass parameters to that object. To be able to follow, make sure that you have the Silverlight runtime installed. Also, you must have an existing [...]

Big integers in .NET 4.0
2010-01-06

The BigInteger structure becomes available if you add a reference to the System.Numerics namespace. BigInteger represents a positive or negative integer of any size.  This is great for doing arithmetic calculations with very large numbers, and is one [...]

Hardware accelerated graphics through XNA: Getting started
2010-01-02

There are some features of the XNA Framework that is unavailable from Visual Basic, but this should not stop you from writing descent games in Visual Basic. On my machine, I have installed XNA Game Studio 3.1 (a game developing environment from Micro [...]

The simplest query tool ever
2009-12-21

A colleague wanted to do a database query from a computer without any database client. He needed a tool that allowed him to type in a SQL query, and receive a sortable grid with the result set. All of these features are built-in in the .NET Framework [...]

ASP.NET 4.0: Diagrams
2009-12-18

To get your hands on this new and cool feature, create an ASP.NET 4.0 application or web site from within Visual Studio 2010. Check the Data section of the Toolbox window for a new control called Chart. Dragging out a Chart onto a web page creates th [...]

Collection initializers
2009-11-08

Now I have had the opportunity to try out the new collection initializers of Visual Basic 10. This is good stuff and I am very happy about being able to do line breaks when I use this (just as C programmers can do whenever they want). Examine this si [...]

Collection initializers
2009-06-25

There are only a few new changes and additions made to the language Visual Basic in version 10. Changes in version 7, 8 and 9 were huge, and from version 9, I really like what it has become, and all that is needed in version 10 is some polishing. I w [...]



En kopp kaffe!

Bjud mig på en kopp kaffe (20:-) som tack för bra innehåll!

Bjud på en kopp kaffe!

Om...

Kontaktuppgifter, med mera, finns här.

Följ mig

Twitter Instagram
GitHub RSS

Public Service

Folkbildning om public service.

Hem   |   linktr.ee/hesselbom   |   winsoft.se   |   80tal.se   |   Filmtips