Hi newsgroup,
I have a C# code that I tried to convert to VB.NET using a snippet
converter.
The converter produced something I don't understand, namely:
<Config("Camera", "cameraType")_
Shared cameraType As CameraType
What does the "<" statement do, please?
Thanks
Mike
C#:
public class ActionGameWindow : GameWindow
{
enum CameraType
{
FPS,
TPS,
Free,
Count,
}
[Config( "Camera", "cameraType" )]
static CameraType cameraType;
[Config( "Camera", "tpsCameraDistance" )]
static float tpsCameraDistance = 4;
[Config( "Camera", "tpsCameraCenterOffset" )]
static float tpsCameraCenterOffset = 1.6f;
is being translated to:
VB.NET:
Public Class ActionGameWindow
Inherits GameWindow
Private Enum CameraType
FPS
TPS
Free
Count
End Enum
<Config("Camera", "cameraType")_
Shared cameraType As CameraType
<Config("Camera", "tpsCameraDistance")_
Shared tpsCameraDistance As Single = 4
<Config("Camera", "tpsCameraCenterOffset")_
Shared tpsCameraCenterOffset As Single = 1.6F 3 1162
These are "attributes" applied to the object.
Steve C.
MCAD,MCSE,MCP+I,CNE,CNA,CCNA
Mike Hamilton wrote:
Hi newsgroup,
I have a C# code that I tried to convert to VB.NET using a snippet
converter.
The converter produced something I don't understand, namely:
<Config("Camera", "cameraType")_
Shared cameraType As CameraType
What does the "<" statement do, please?
Thanks
Mike
C#:
public class ActionGameWindow : GameWindow
{
enum CameraType
{
FPS,
TPS,
Free,
Count,
}
[Config( "Camera", "cameraType" )]
static CameraType cameraType;
[Config( "Camera", "tpsCameraDistance" )]
static float tpsCameraDistance = 4;
[Config( "Camera", "tpsCameraCenterOffset" )]
static float tpsCameraCenterOffset = 1.6f;
is being translated to:
VB.NET:
Public Class ActionGameWindow
Inherits GameWindow
Private Enum CameraType
FPS
TPS
Free
Count
End Enum
<Config("Camera", "cameraType")_
Shared cameraType As CameraType
<Config("Camera", "tpsCameraDistance")_
Shared tpsCameraDistance As Single = 4
<Config("Camera", "tpsCameraCenterOffset")_
Shared tpsCameraCenterOffset As Single = 1.6F
Mike Hamilton wrote:
The converter produced something I don't understand, namely:
<Config("Camera", "cameraType")_
Shared cameraType As CameraType
What does the "<" statement do, please?
That is VB.NET syntax for applying an attribute. See
<http://msdn2.microsoft.com/en-us/library/5x6cd29c(VS.80).aspxfor
attributes in the .NET framework.
--
Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Eric A. Forgy |
last post by:
Hello,
I am just learning Java and am trying to write a method that does
something like
//===========================================
public Static List find(double array,double val,String...
|
by: Ensoul Chee |
last post by:
I used
#include <iostream.h>
int m;
cout << "Hexadecimal == 0x" << hex << m << endl;
to print value of m in hexadecimal mode.
But I got the compile error like this
couttest.cpp:20 `hex'...
|
by: Christian Schmidbauer |
last post by:
Hello!
I prepare my XML document like this way:
-------------------------------------------------------
PrintWriter writer;
Document domDocument;
Element domElement;
// Root tag
|
by: Diandian Zhang |
last post by:
Does anyone have an idea, how to do it? Thanks in advance!
|
by: wangzhihuii |
last post by:
Hi all,
I'm really confused, can
cout<<"";
contribute anything to the routine ?!!
my programm won't work properly without this trivial sentence.
Sincerely
vivian
|
by: Jon Noring |
last post by:
Out of curiosity, may a CDATA section appear within an attribute
value with datatype CDATA? And if so, how about other attribute
value datatypes which accept the XML markup characters?
To me,...
|
by: Filipe Sousa |
last post by:
Hi!
Could someone explain to me why this operation is not what I was expecting?
int main()
{
int x = 2;
std::cout << x << " " << x++ << std::endl;
return 0;
}
|
by: Holger |
last post by:
Hi
I have not been able to figure out how to do compound statement from C
- "<test>?<true-val>:<false-val>"
But something similar must exist...?!
I would like to do the equivalent if python...
|
by: ismailc |
last post by:
Hi, I need help please.
Update system to to new version & moved on to .Net2
But now my code that worked in my .Net1 xslt does not work.
.Net1 fine:
<xsl:stylesheet...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |