What's the difference between I2CDevice.CreateReadTransaction() and new I2CDevice.I2CReadTransaction()

I’m looking into the I2C API, and I’m getting a bit confused. There seem to be multiple ways to create an I2C transaction.

I can either use the static I2CDevice.CreateReadTransaction method ( [url]Microsoft Learn: Build skills that open doors in your career ), or create a new I2CDevice.I2CReadTransaction object ( [url]Microsoft Learn: Build skills that open doors in your career ). I’m puzzled as to what the difference is. Both take the same number of arguments.

I asked this on StackOverflow as well, but got no response: [url]http://stackoverflow.com/q/6138853/102441[/url]

Which should I use, and why?

Maybe this would help? GHI Electronics – Where Hardware Meets Software

Not really. I’ve managed to write the code, and I think I’ve worked out how Microsoft intended the transactions to be used (ie create them once, use them over and over again). I’d just like to know whether the code for I2CDevice does this behind the scenes, or if there’s more going on:


public static I2CWriteTransaction CreateWriteTransaction (byte[] buffer)
{
	return new I2CWriteTransaction(buffer)
}

To me, writing such a method seems like a serious mistake on microsoft’s part. Even from a shorthand point of view, it only saves one character.