Change A Few Lines Of Code From CS.NET To .NET?

Mar 23, 2011

Basically I'm trying convert the following....

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

[code]....

View 3 Replies


ADVERTISEMENT

Comment Multiple Lines Of Code/block Of Code In VB?

Jul 1, 2009

How to comment multiple lines of code/block of code in VB?

View 5 Replies

Excel Vba - Can The Lines Of Code Be Reduced In This .net Code

Jul 26, 2011

I have the following code, my employer wants me to reduce the lines of code to do the job.

Private Function getClientSheetNames(Optional ByVal type As String = "all") As List(Of String)
If type = "extra" Then
Return clientExtraSheetNames
End If

[code].....

I am not able to make out how can I cut the lines and have the same functionality !Are there any vb.net construct that can reduce the loc by better implementation ?Can I have a new function to be called from getClientSheetNames and getDevSheetNames that will can implement code resue ?Can I introduce polymorphism in a possible new function ?

View 1 Replies

How To Change The Style Of Grid Lines.

May 5, 2009

I wanted to change the style, width and color of the grid lines for my X/Y scatter graph.Basically, I want to distinguish the minor grid lines and the major grid lines.

View 1 Replies

Change Color Of Different Lines On A Rich Text Box?

Mar 21, 2012

I'm creating a program that pings a host. I'm trying make text appear RED on one line if it's down, and GREEN if it's UP.

View 6 Replies

What Is These Two Lines Of Code Saying

Mar 8, 2011

Seems begineer but i really do not understand what these lines of code saying, since I'm kinda like newbie in datatable and dataview or such stuff! [code]).DefaultView.Count = 0 Then EncodeToText will encoed the text given from DESCRIPTION field in the database and convert it to string. So it is filtering it but only certain description fields, how ever by some strange reasons that second line is not working properly.

View 1 Replies

Change Spacing Between Lines Without Changing Font Styles?

Apr 16, 2009

I am pasting into a RTB from the clipboard and from different sources.At the end, I want to reformat the content of the RTB in a way that all font styles (such as bold, italic etc) remain unchanged, but only the line spacing gets uniform.

I do not find a way to change line spacing without changing the font (and at the same time removing all the bold and italic attributes)

View 1 Replies

Get The Lines To Change Their Locations But The DragHandle Rectangles Won't Update?

Feb 23, 2010

I am able to get the lines to change their locations, but the dragHandle rectangles won't update - they stay at their starting locations. I would have thought since the points list changed the updateLinehandles() would fix it.

Friend Class Line
#Region " Variables "
Public p1 As Point
Public p2 As Point

[code]....

View 1 Replies

Comment Out Lines Of XML Code Through VB?

Jun 16, 2011

When reading and writing data to an XML file, in XML code, through a VB application, how does one go about commenting out a specific XML code line? From what I've gathered the original <!-- and --> tags aren't compatible. So what would be the VB alternative? Or is it just not possible to comment out a line of XML code using XML code through VB?

View 5 Replies

Converting C# To Vb 3 Lines Of Code?

Jan 2, 2012

i'm making a console program that consults a website of my work but it uses https and has a Untrusted certificate so i get this error: This Connection is Untrusted i did some research on the internet about this issue and come up with this code

//for testing purpose only, accept any dodgy certificate. public static bool ValidateServerCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)

[Code]...

View 6 Replies

Entering Last And First Name With Only 2 Lines Of Code?

Feb 5, 2012

I am a beginner trying to create a console program that lets the user enter a last name, then a first name with only 2 lines of code. The program should then display the first name followed by the last name.

I know how to do this, just not in 2 lines of code.

View 9 Replies

Lines Of Code In VB Project

Aug 7, 2009

What is the easiest/simplest way of finding out the number of lines in your VB project?

View 4 Replies

Splitting Code Into Two Lines?

Apr 12, 2010

I have a long line of code and I would like to split it into two lines. I've tried using , _ and & _ but they did not work.

Here is the

vb.net
If c < 1 Or c > 9 Or a = c Or b = c Or a = b Or occupied(b) <> occupiedEnum.empty Or occupied(c) <> occupiedEnum.empty Then

View 6 Replies

Way To Reduce Lines In Code?

Jan 25, 2010

I have a school project. by selecting an item from combobox it will show 2 pictures and 2 labels. I used a select case first but it didn't work; only for the first item ;do i have to make every pictures and labels invisible which are 30 controls and repeat it in every index? I try the if else but it did not work too.[cod]

View 4 Replies

VS 2008 Change Specific Lines Of Text In A Listview At Certain Times Of The Day?

Feb 7, 2010

Im trying to change specific lines of text in a listview at certain times of the day. Heres what im using atm , but im not sure how to change the text in the listview.

If Now.Month = 2 And Now.Day > 6 Then
ListView1.Items(0) = ("My text here !!")
End If

View 9 Replies

C# - Insert Some Lines Of Code To Other Projects?

Mar 14, 2011

i have one project (let's call it project1) that is going to add properties to another project's class. The thing is I wanted to make it automatically. So in my project there are two lines of code which I want to add at the bottom of the class.vb or class.cs in a project called project2. Is it possible? If so, how?It is a data access builder software which after adding some new columns to our database we use it to generate its properties and its parameter to be added in BLL. Since we do it often (changing our database structure) I did not wanted to copy data from data access builder software and add it to project2 manually.

View 3 Replies

C# - What Happens If Add Lines To IL Code And Add Breakpoints To Program

Aug 8, 2009

If I add let's say 1 line at the beggining of a method, if I set a breakpoint through Visual Studio on the first line, will it point to the first line or the second? If it will flag the wrong line, is there anything we could do when editing .exe files to ensure a regular debugging session later?Isn't there something like setting line x to be Y? I remember seeing something like that somewhere, not sure if .NET related or not.

View 4 Replies

How To Find Lines Of Code In VS 2010

Jun 8, 2011

How to find Lines of Code in VS 2010?

View 7 Replies

Make A Pause Between Code Lines?

Mar 4, 2009

How do I make a pause between code lines? See code below. This just prints the word "Hello", I was hoping to put a delay between the letters to make it look more real. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click, Button2.Click

SendKeys.Send("%{tab}") SendKeys.Send("H") SendKeys.Send("e") SendKeys.Send("l") SendKeys.Send("l") SendKeys.Send("o")
End Sub

View 3 Replies

Record All Lines Of Code Being Executed?

Aug 15, 2011

I have a form that on load keeps closing without any errors... I have no clue what it wrong with it. How can I record all the lines of code being executed so that I can find out why it is closing. There are no errors or me.closes.

View 3 Replies

Setup DataTableAdapters To Allow For Easy Code Change When Change Server Names?

Feb 20, 2012

I'm getting familiar now with using the Dataset Designer and how it makes for quick and easy updates and query of tables. I use to use the OleDB commands and leave the Connection String as a Global Constant so I can easily change it if the server name changes, or if we have to re-direct the .NET to another instance of the database.

But now that I use the Dataset designer I'm concerned that I maintain flexibility and support in the long run. how the Dataset designer works and where it stores it's connection string info? And how difficult that would be to update. It looks like I modify the App.config file, but I'm unfamiliar with this.

What am I getting myself into? It looks like a standard XML file. Is that it?

View 1 Replies

Code For Drawing Multiple Lines On Form?

Jun 5, 2011

I want to draw three straight lines on a form. if the following code is correct:

Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
Dim Line1 As System.Drawing.Graphics

[CODE]........

Can I use only one variable (Line1) to draw three straight lines?

View 2 Replies

Count The Total Number Of Lines Of Code?

Dec 29, 2009

i wrote an application in VB.NET and since i charge by the line, i would like to calculate how many lines i wrote. i have about 100 different vb files with my code. how do i count all the lines?

View 8 Replies

How To Hard Code Multiple Lines In A Richtextbox

May 18, 2010

I am attempting to hard code a richtextbox that has multiline characters upon the Load_Event. However, whenever I use the "&controlchars.newline _ " I get a syntax error and end of statement expected error.

[Code]...

View 3 Replies

Ignoring Lines Containing Certain Numbers (Code Included)?

Dec 3, 2009

Basically I want to have a lines that contain certain numbers ignored. Where lines that do not contain those certain numbers show up in textbox1.text.For Instance.In the code I want it to ignore all lines that contain "1234" and "1645" when it reads Accessed.txt, and output every line that does not contain those numbers. So if a line contains "78910" it would output that line into textbox1.text.Here is what I have so far, and it works as long as I only have 1 if not contains statement. When I have more than one, it doesn't work at all and just outputs everything in the text file.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles Button1.Click
Dim r As New System.IO.StreamReader("S:accessed.txt")

[code].....

View 5 Replies

Moving Lines In Code Of A Program While Running

Oct 27, 2011

I want to go back to the input line in the four places in the code that say something like strinputmessage = strnegative or strinputmessage = strnonnumeric.I need to be able to go back to where you input the data so that the index does not increase.I tried using a GoTo <23> to go back up to the line i needed but then it gave me all these weird errors about the End and Next were missing.[code]

View 3 Replies

Size Projects With About 100k Lines Of Code?

Feb 11, 2010

I recently inherited a nice size projects with about 100k lines of code and would like to find out what code is actually being run. I've found a number of routines that are not called at all and looking for a fast and automated way to explore the Business Layer to see what other code can be refactored out quickly.

This is an ASP.NET website with VB.NET codebehind and Business Layer.

View 4 Replies

Randomizing - Code That Reads In Lines Of Tabbed Text

Jan 4, 2010

I have a piece of code that reads in lines of tabbed text. It is a game of who wants to be a millionaire. What I would like to do is get the game to incorporate random questioning.
The format of the text file is as follows:

Which record company did the Beatles create? (tab)Apple Records (tab)Sony (tab)BMG (tab)LiteFM (tab)Apple Records (tab) Which has the highest mountain? (tab)Mars (tab)Ireland (tab)Iceland (tab)America (tab)Mars(tab) With a set amount of lines. I want the program to choose each question randomly and not to repeat the question. I'm not sure how to incorporate it into the code.

Quote:

[CODE].....................

View 1 Replies

Regex.Replace - 3 Lines Of Code Be Condensed To 1 Line?

Jan 13, 2010

Yes, I've googled. But I must defer to the experts as time to study Regex is not available.

[Code]...

Can these 3 lines be condensed into one line? If so, how? The purpose is to remove all spaces before and after all occurrences of & in a string.

View 3 Replies

VS 2010 Why Does Visual Studio Display All Lines Of Code

Sep 20, 2011

I only want it to display the code only related to the button i double click not the whole entire code of the program unless it automaitcally does this i am not sure i am new to visual studio and programming!

View 5 Replies







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