TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Administrator
Tech Writer
2.2k
1.5m
Accessor Problem!
Mar 1 2003 4:29 AM
i got this routine from Bhagvan Chougule (Thanks) and i need to convert from VB to C#. I dont know how because i never saw before a accessor routine with parameters in C#. The VB code: Public Property Field(ByVal strFieldName As String, Optional ByVal rowNum As Integer = 0) get Return objDataTable(tableNum -1).Rows(rowNum) (strFieldName) End Get Set (ByVal Value) objDataTable(tableNum -1).Rows(rowNum) (strFieldName) = Value End Set End Property and i convert it to : public string Field (string strFieldName, int rowNum) { get { return objDataTable(tableNum-1).Rows(rowNum)(strFieldName); } set { objDataTable(tableNum-1).Rows(rowNum)(strFieldName) = value; } } but i have an error on the get and the set, asking for ";" Help this newbie!
Reply
Answers (
3
)
Excel and graphics
Stopping new windows from being made when one just like it is already made