473,322 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

What does the "<" statement do?

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
Aug 24 '07 #1
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
Aug 24 '07 #2
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/
Aug 24 '07 #3
Thank you!
Mike
Aug 24 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
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...
7
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'...
1
by: Christian Schmidbauer | last post by:
Hello! I prepare my XML document like this way: ------------------------------------------------------- PrintWriter writer; Document domDocument; Element domElement; // Root tag
7
by: Diandian Zhang | last post by:
Does anyone have an idea, how to do it? Thanks in advance!
4
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
10
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,...
12
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; }
11
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...
1
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...
0
isladogs
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...
1
isladogs
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...
0
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...
0
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...
1
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
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
0
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...
0
isladogs
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.