.net - Put Comments On Each Line?

Mar 2, 2012

I used to be a C# developer so this commenting style was very easy in C#. This is driving me crazy but how do you do this in VB.NET without getting a syntax error?: Private ReadOnly Property AcceptableDataFormat(ByVal e As System.Windows.Forms.DragEventArgs) As Boolean

[Code]...

View 3 Replies


ADVERTISEMENT

Getting The Multiple Line Comments?

Jul 24, 2006

I am working with VB 05 Express, and I know C has this, but I want to comment multiple lines of code, without always having to put the little ' symbol on ea. line. Like, I think C has something like this-

\*
Comment! Comment!
Comment! Comment!
*/

or something like that !

View 14 Replies

C# - Regex To Remove Single-line SQL Comments?

Mar 23, 2012

give me a working regex expression (C#/VB.NET) that can remove single line comments from a SQL statement ?I mean these comments:

-- This is a comment

not those

/* this is a comment */

because I already can handle the star comments.I have a made a little parser that removes those comments when they are at the start of the line, but they can also be somewhere after code or worse, in a SQL-string 'hello --Test -- World' Those comments should also be removed (except those in a SQL string of course - if possible).Surprisingly I didn't got the regex working. I would have assumed the star comments to be more difficult, but actually, they aren't.

As per request, here my code to remove /**/-style comments (In order to have it ignore SQL-Style strings, you have to subsitute strings with a uniqueidentifier (i used 4 concated), then apply the comment-removal, then apply string-backsubstitution.

static string RemoveCstyleComments(string strInput)
{
string strPattern = @"/[*][wds]+[*]/";
//strPattern = @"/*.*?*/"; // Doesn't work

[code]....

View 3 Replies

IDE :: Example Code In Xml Comments Unreadable Due To Missing Line Breaks

Sep 30, 2009

I am trying to use the xml comments suggested (with VB in a ASP.net project in Visual Studio 2008).I want to give examples of how to use a class, for example, so I write [code]This is readable in the code itself, but the resulting help information in the Object Browser is unusable.The summary, parameters and returns stuff is OK,but the example code is all as one block, with a single space instead of the line endings.I know that most XML treats all whitespaces the same (space, line ending, etc.) but since <code> is described as being for multi-line code blocks, I expected it to respect line endings and indentation.Ideally it would colour-code the code as visual studio does, but the least it should do is respect space (similar to the HTML <pre> tag).Otherwise how is it useful for multi-line code blocks?

View 1 Replies

C# - Different Color For Code Comments And XML Comments?

Sep 26, 2011

I've noticed that in C# XML comments and code comments can have different colors by changing the settings in Tools > Options > Environment > Fonts and Colors > Display Items:

- Comment: controls code comments XML comment: controls XML comments

This works well in C# <summary>This XML comment is green</summary>

[Code]...

View 2 Replies

VS 2008 Open A Txt File, Read Line By Line, Decode Each Line Into An Array And Display?

Oct 14, 2011

what i need to do is open a txt file, read line by line, decode each line into an array and display. Now all works ok apart from one line.

sTextLine = objReader.ReadLine() <-- Value of string cannot be converted.

full code here
-------------
Dim objReader As New System.IO.StreamReader(sOpenFile.Text)
Dim sTextLine As New ArrayList()
Dim sText As String = ""
Dim i As Integer = 0

[code]....

View 3 Replies

.net - Checking For Comments?

Jun 2, 2011

i am writing a vb.net program which gets a c program as an input and checks it for errors,now i want my program to skip the comments in the c program,i have written some code but its not working

For Each line In TextBox1.Lines
sample = TextBox1.Lines(k)
Dim len As String
len = sample.Length

[code]....

View 2 Replies

VB Comments In Completion Box?

Dec 30, 2010

I do not understand vb comments. I read that it is possible to give a hint in the code completion box when someone (or myself?) is using my code. But I do not find something in visual studio.

View 4 Replies

.net - Using Method Summary XML Comments?

Feb 9, 2011

I have been using the method summary XML Comments at the top of my procedures lately and am wondering if there are any logical or good practices related to this.I never put anything in the remarks because I put the description of the method in the summary tag. What belongs in the summary and what belongs in remarks?I seldom put anything in the returns tag because it seems like it would be redundant as I usually explain what is being returned in the summary. Should I simply keep the type of object returned in the returns tag?

View 4 Replies

.net-checking For Nesting Of Comments?

Jun 7, 2011

i am writing a program which takes a c program as input and it has to check whether there is a nesting of comments in that c program and gives an output based on that,how do i go about that

View 1 Replies

Add Comments To An Array Initialization?

Feb 24, 2012

Is there a way to add comments to an array initialization? For example:

Dim test As UShort() = { _
1, _
2, _
3, _
4 _
}

I'd like to add a comment on each line, but the obvious syntaxes fail (for obvious reasons)

1, 'test _
1 'test, _
So, am I out of luck?

View 10 Replies

Automatically Add Necessary Spaces To Comments?

Jul 5, 2010

When I'm writing comments in my code, I often forget to add the initial space after the comment identifier.

'this is a comment

when really it is supposed to be

' this is a comment

I realize this is quite trivial, and you could simply say "just add the damn space you idiot", but I'd really like to automate this so that I just don't have to worry about it. add the comment space?note I do realize that a catch all string replace or regex replace could screw up other things ... IE:

Dim something As String = "I'm a nerd"

would actually come out

Dim something As String = "I' m a nerd"

if it's only on a line by it's self and is not followed by a second single quote... IE: '' would not trigger the replacement.

View 3 Replies

Comments Are Not Stored To The Table?

Jul 16, 2010

I am working with a datagridview on my form and have a CellContent Click event as shown below;
[code...]

Now, when I check the checkbox Yes and type in the comments textbox, the Comments are not stored to the table. However, the checkbox is set to a true value.

View 4 Replies

Compile Code Without Comments?

Nov 6, 2010

Is it possible to compile the code without the comments? Or are the comments not compiled as default?

View 3 Replies

Create Documentatiom From XML Comments?

Jan 7, 2010

I've been searching for this for the last 2 days, but can't find anything that works.

I just want to generate a chm, html, word document it doesn't matter what, form my xml comments. It needs to be freeware.

View 5 Replies

Datalist With Expandable Row For Comments?

Feb 23, 2009

I am completely Goggled out on this one. We currently have a datalist consisting of rows of data for our company. What I need to do is to add a link into the individual cells of a particular column called candidate profile. The link will be View Notes. When that link is clicked, I would like to have a new row expand right below the existing row to allow the additions of comments in the empty row. When the user comes to the page and there are existing comments for the row of data, have it expanded and give the user the ability to expand, or close the comments as they see fit. I also need to figure out the best way to allow the user to enter in the comments as well.

View 5 Replies

Documentation - XML Comments Not Showing On .Net?

Aug 25, 2009

I am using something similar to this and it will not display the Summary or Remarks when I am attempting to use the Intellisense for this function?

[Code]...

View 1 Replies

Get File Comments Or Tags?

Aug 6, 2009

I'd like to realize a plugin for MC with Windows Seven but I have a problem: I don't know how I could access to tags and comments of a file. I know how to get 'system properties' (creation date, lenght, ...) but I ignore how to get metadata like tags or comments.

View 2 Replies

IDE :: VB XML Comments Not Displaying XML Skeleton

Nov 19, 2008

I'm using Visual Studio 2008 and when I type ''' I except to see a skeleton of an XML comment but for some reason when I type ''' nothing appears. I know this worked in 2005 how can I get it to work in 2008?

View 1 Replies

IDE :: XML Comments In Certain Project Types

May 14, 2009

I make pretty extensive use of XML Comments in Visual Studio, but I'm discovering that some project types either don't appear to support them or else have default project settings preventing them from working properly.

[Code]...

View 1 Replies

IDE :: XML Comments In Certain Project Types?

Oct 12, 2011

I make pretty extensive use of XML Comments in Visual Studio, but I'm discovering that some project types either don't appear to support them or else have default project settings preventing them from working properly. For example, I position the cursor immediately over a Class, Variable, or Sub declaration and I type ''' - usually this prompts Visual Studio to autofill a whole XML comment block for me, but in a recent Class Library project with COM enabled, this does nothing at all.

View 4 Replies

IDE :: XML Documentation Comments Not Working?

Sep 1, 2006

One of the Projects in my VB.NET Solution seemed unwilling to let me write XML Documentation in my code. When tapping ''' on the line directly above a method declaration, nothing would happen. The project consisted of modules and classes only(no forms), so I initially thought that had something to do with it.

Later I found that under project properties and the Compile tab, the "Generate XML documentation file" checkbox was left unchecked. Checking this instantly allowed me to place the comments normally. After doing some testing, I also found that Creating an Empty project leaves the checkbox unchecked, while creating a Windows Application automatically checks it.

View 3 Replies

Parsing The String For Comments?

Apr 19, 2011

I have a string(text) which has some sigle line and multiline comments.

single line comments are shown by "--" and multiline by "/* */".

View 2 Replies

Permanently Burn Comments Into Pdf?

Mar 3, 2010

I have been researching on the possibilities of programmatically burning comments on pdf files permanently but so far I have not been successful. Has anyone writen code to do this or point me in the right direction? Permanently burn comments into pdf?

View 2 Replies

VS 2010 Inheriting XML Comments

Apr 20, 2010

I have a MustInherit class, let's call it BaseClass, with a bunch of MustOverride ReadOnly properties. The user is supposed to inherit this class and override the properties, returning appropriate values.To help the user decide which property does what, I have included XML comments for each property, so the BaseClass looks like this [code]I now want to enable the user to inherit this class (DerivedClass1) instead, so that he can, for example, override only the Name property, and leave the other properties untouched. This way, he can create a slight modification to one of the default classes, instead of having to rewrite it completely (in reality, there are loads more properties). There are no XML comments, because they are in the BaseClass, and not in the DerivedClass1, which is the class I'm inheriting. In other words: the XML comments are not 'inherited'.Do I really have to copy/paste all the XML comments from the BaseClass and put them in the DerivedClass1 too? Or can I somehow tell the DerivedClass1 to use the XML comments from its base class?

View 1 Replies

Xml Comments As Pertaining And Attributes

Aug 22, 2010

Can someone recommend a good source for more information on XML Comments as pertaining to visual basic .net. Also what are attributes? Where can I find out more about them as pertaining to visual basic .net.

[Code]...

View 9 Replies

XML Comments In Class Diagram?

Jan 7, 2010

I am busy creating documentation for my application and want to implement xml comments in my class diagram. Is it possible to show xml comments of a class in the class designer/diagram?

View 1 Replies

Read Text From A Listbox Line By Line And Put Current Line In A Label?

Jan 16, 2011

how to read text from a listbox line by line and put current line in a label?

View 3 Replies

Reading A File Line By Line That Within The Line The Values Are Delimited By "?

Dec 1, 2011

How would i go about reading a file Line by Line that within that line The values are delimited by " Example of the data:

"bob" "cat" "1243"
"steve" dog" "6789"

I've started this with this code but not sure how to go about the next stage:

Using MyReader As New _
Microsoft.VisualBasic.FileIO.TextFieldParser(My.Application.Info.DirectoryPath & "Records28112011.jd")
MyReader.TextFieldType = FileIO.FieldType.Delimited

[code]....

View 9 Replies

Imbed Comments In An Array Initializer?

Mar 20, 2012

I find myself wanting to do something like this:

' toy example
dim foo() as Integer = { _
'Integers from 1 to 5[code]....

but I get "Expression expected" errors.I would have expected the compiler to treat comment lines as nulls. Is there a "right" way to do this?

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved