|
-
May 18th, 2004, 08:38 PM
#1
Thread Starter
Frenzied Member
problem declaring a constant [RESOLVED]
I'm just learning c# and I'm trying to convert a class I wrote in vb.net to help me learn.
problem is, I'm stuck at the beginning. can someone tell me what is wrong with the syntax here?...
PHP Code:
using System;
using dart.powertcp.telnet;
namespace TicketingLibrary
{
/// <summary>
/// Summary description for Calix.
/// </summary>
public class Calix{
private Segment Segment;
private string adsl ;
private string Day = Now.Month & "-" & Now.Day;
Const string c_Login = "act-user::Trouble:::Vanhalen1" & Chr(13);
Const string c_logout = "canc-user" & Chr(13);
Const String c_cstat = "rtrv-cstat-adsl::";
Const String c_pm = "rtrv-pm-adsl::";
Const String c_FEND1Day = ":::,,FEND,,1-day,";
Const String c_FEND15min = ":::,,FEND,,15-min,";
Private String strSync(1);
Private String strSNR = "";
Private String strESL15 = "";
Private String strSESL15 = "";
Private String strESL = "";
Private String strSESL = "";
Private String strUASL = "";
public Calix()
{
//
// TODO: Add constructor logic here
//
}
}
}
I've got squiggly red lines under all but the first two declarations. I suspect the Const lines are causing problems.
any ideas?
Last edited by Andy; Aug 13th, 2004 at 12:10 PM.
-
May 18th, 2004, 11:12 PM
#2
Lively Member
Your format looks correct... other than the the uppercase of Const and String. Also, VB & is + in C# I believe.
Visual Studio .net 2003 EA
VB .net
C#
-
May 19th, 2004, 12:33 AM
#3
Sleep mode
All the basic declarative keywords are lowercase and string is like String .
-
May 19th, 2004, 12:42 AM
#4
Lively Member
PHP Code:
private string[] strSync=new string[1];
-
May 19th, 2004, 07:11 AM
#5
Thread Starter
Frenzied Member
wow! I didn't realize that the language was case sensitive. I did notice that the IDE doesn't use 'Pretty' formatting. like, it won't neatly pack the words together or auto capitalize keywords.
Thanks everyone.
Thanks Ayan for the correction on my array
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|