因此,为了开车去商店,你需要确定一辆汽车的具体实例。被授权(通过拥有钥匙)到Drive。在现实世界中,您通过乞讨,借用,购买或窃取特定车辆来获取该实例。 在计算机方面,您需要相同的东西 - 一个实例一个类,这里​​的事情要清楚得多:获取Car类实例的唯一方法是通过 New 关键字创建它: If you don't know what an instance is, then you are trying to run before you can walk: you need to go right back to the beginning and start understanding the basics.Let's talk about cars for a moment. A Car is a vehicle that has four wheels, that you Drive by manipulating it's controls. But you can't drive a Car to the shops, because a Car is a general concept rather than a specific vehicle. You can drive "that car", or "this car", or "your car" (or even "my car" if I give you the keys) because each of those "variables" reference a specific vehicle. "Your car" is the Blue Ford, registration number "ABC 123" and "My car" is that Red Mercedes, registration number "XYZ 456". each of those vehicles is an instance of the generic class of Cars.So in order to drive to the shops, you need to identify a specific instance of a Car that you are authorised (by possession of the keys) to Drive. In the real world you acquire that instance by begging, borrowing, buying, or stealing a specific vehicle.In computer terms, you need the same thing - an instance of a class, and here things are a lot more clear cut: the only way to get an instance of the Car class is to create it via the New keyword:Dim myCar As new Car("Mercedes", Color.Red, "XYZ 456") 创建CryptoStream时,当它特别需要别的东西时,你传递一个字节数组: CryptoStream构造函数(Stream,ICryptoTransform,CryptoStreamMode)(System.Security.C ryptography) [ ^ ] 您可以在类描述中找到如何使用它的示例: CryptoStream类 [ ^ ] 但是说真的:如果你不了解基础知识,那么你应该停止你正在做的事情,然后马上回去学习它们,或者你要去非常困惑。When you create your CryptoStream, you are passing it an array of bytes when it specifically requires something else: CryptoStream Constructor (Stream, ICryptoTransform, CryptoStreamMode) (System.Security.Cryptography)[^] You find an example of how to use it under the class description: CryptoStream Class[^] But seriously: if you don't know the basics, then you should stop what you are doing and go right back to learning them first, or you are going to get horribly confused. 这篇关于类型'1维字节数组'的值无法转换为'system.security.cryptography.icryptotransform'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-26 22:51