C# - What Is Purpose Of '' Operator In Vb

May 16, 2011

I want to know what is purpose of '' in vb ? I have this statement: frontDigitsToKeep 2 and I want to convert it to C#.

View 2 Replies


ADVERTISEMENT

What Is The Purpose Of Integer Division Operator ""

Aug 16, 2011

what is the actual use of Integer Divisor operator "" in vb.net ?

View 4 Replies

Error: Option Strict On Disallows Operands Of Type Object For Operator '='. Use The 'Is' Operator To Test For Object Identity

Jan 27, 2010

I am tightening up my coding with the Option Strict set to ON. It has now produced alot of errors. An example of this is:

If AllocatedDGV.Rows(i).Cells("RoomNumber").Value = RoomsAvailableDGV.Rows(j).Cells("RoomName").Value Then

It gives me the following error: Option Strict On disallows operands of type Object for operator '='. Use the 'Is' operator to test for object identity.

View 6 Replies

Option Strict On Disallows Operands Of Type Object For Operator Use The 'Is' Operator To Test For Object Identity

Apr 6, 2012

I need to write an interface to get data to/from our data files.

We have a low level class that holds field values for each record read from the files.

This just holds two values, the value read from the file (DBValue) and the updated value that may need to be written back to the file (CurrentValue).

These values may be any of the standard value types (integer, date etc) or a string.

Either value (DBValue or CurrentValue) may be null if not defined.

I have written the class to manage this data which works fine while option strict is NOT on.

But we have an office policy of having option strict on all the time.

When I put option strict on, my object value comparisons fail with the error: "Option Strict On disallows operands of type Object for operator '='. Use the 'Is' operator to test for object identity."

Question, how should I change the following code to handle option strict on ...

This is all running on Visual Studio 2010

[Code]...

View 1 Replies

Coalesce Operator And Conditional Operator In .NET?

Mar 10, 2009

Possible Duplicate: Is there a conditional ternary operator in VB.NET?

Can we use Coalesce operator(??) and conditional ternary operator(:) in VB.NET as in C#?

View 5 Replies

What Is The Purpose Behind The OnXXX()

Aug 31, 2010

I just don't understand the OnXXX(). What are they? What do they do? When should you use them?

View 2 Replies

Purpose Of Dividing Saturation / 50 And Hue / 50?

Aug 17, 2009

i am controlling the hue and saturation of the backcolor of the form with scrollbars:

Private Sub tbHUE_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tbHue.Scroll
Dim r, g, b As Integer
HSVtoRGB(r, g, b, tbHue.Value, tbSaturation.Value / 50, 255)

[code]....

i would like to know what is the purpose of dividing by 50?

View 3 Replies

VS 2008 - What Is The Purpose Of Interface

May 12, 2009

What is the purpose of Interfaces? it's just a collection of properties, method and events which can be used over and over again by different classes. Its no different than declaring the needed method or property in the classes separately rather than using Interface (because in Interface, you have to write the inner working in each classes implementing the interface). Is there a case where an interface comes in handy (I mean cases where Interfaces are absolutely necessary, without them the program won't work)?

View 9 Replies

What Is Purpose Of Public Property

Jan 9, 2010

What is the purpose of Public property? why would i do this instead of just doing Public abc as string? [code] Because you may want to do data validation on it before assigning the value to the Private variable. Because you might want to raise an event when the value in the Private variable changes. Because you might later want to make it a ReadOnly property.

View 12 Replies

What Is The Purpose Of The Function CLine

Jul 21, 2009

What is the purpose of the function CLine, because it is used in my code and it isn't a member of the namespace it is attached to in the vb6 code pasted straight into visual studio 2005, what would it do in this context:

frmXML.CLine = 1

frmXML is a visual basic.net windows application.

View 15 Replies

Dual-purpose Cut/Copy/Paste ?

Jul 19, 2010

My app displays a list of records in a DataGridView on the main form. I've developed code for cut/copy/paste for the selected records and have put the code behind Cut/Copy/Paste menu items under a classic 'Edit' menu design, with the standard shortcut keys(Ctrl + X, Ctrl + C, Ctrl + V).

The trouble is, I also want the shortcut keys to work on selected text when I'm editing inside text fields on a record in the DataGridView. So I need the shortcut behaviour to change depending on whether I'm editing a record or selecting record(s).

View 5 Replies

IDE :: What Is The Purpose Of 'Merge Module Project'

May 11, 2012

I'm am wanting to create a setup Project and see that there is an option to create a Merge Module Project. The description is not clear to me. That is, it says 'Create a Windows Installer Merge Module project to which files can be added'

View 2 Replies

How To Use Operator As A Comparison Operator

Nov 11, 2009

I want to perform equality comparison in VB.NET and cannot get it to work. Error: value of type Boolean can not be converted to System.Drawing.PointF

[code]...

View 4 Replies

.net - The Intended Purpose For <app Name>.exe.config File In A .NET Forms App?

Sep 21, 2010

I am currently reading up on documentation for a possible assignment I might be put on. In a design document they talk about the .exe.config file. They state that its only purpose is to store constants: "Also note that this file is meant to store constants only, it is not meant to write configuration values to (and the .NET 1.1. framework even prevents this by not offering classes/methods to do so). Therefore, configuration is written to XML files using a..."As far as I understand, this is not true. I don't know about .NET 1.1 preventing this, but I remember in my last project that I did write configuration values to that file (I saved GUI contents there). My project was a small prototype, so maybe I did it wrong, but I do not think so...So what is the intended purpose of this file?

View 3 Replies

Call A Delete Function For Different Database Purpose?

Apr 6, 2011

How to create a delete in used to delete my sql database from different database without decalre one by one in vb applcation

View 1 Replies

Comparing Different Integer In Select Case For Different Purpose?

Feb 23, 2009

I have a question regarding Select Case. I am comparing different integer in select case for different purpose. I want to run some code on the case when number is not from the list of below mentioned.Can i use this as i mentioned below in Select case?. If not then what does mean. It don't give me any error. Case Is <> 307, Is <> 1, Is <> 12, Is <> 14, Is <> 56ThanksDalbir Singh

View 3 Replies

Internet Application:Developing For Personal Purpose?

Mar 17, 2011

Just knowing 20 commands i am developing a app?very impressed on myself!Just knowing 10 commands + common sense + special sense each man has i had world most dangerous spy tool....but on my guru & best friend advice i dropped it..but in future will use for good purpose So here is the new scene We are team of workers had blogs,microblogs and other things i decided to create a tool for my self which is like office assistant to assist in our work at office

my tool will do the submission process when we are not in our office

my idea is using a web browser control and do it with vb commands

so kindly think yourself in such position do you agree to do submission task with web browser control or you can do it some other methods?

whats your opinion? what i mean open a website on web browser control submit the details from listbox(which increment on every submission)i think you now got how we are going to do this!!!

so i am need some one advice shall i proceed with this?i had three big challenges

1.Time
2.Yes Of Course Time
3.Ya Time But Time + Work Accuracy

so kindly guide shall i use the web browser control or use method like direct server post?

View 1 Replies

MonthCalendar Object - Application For The Purpose Of Testing

May 6, 2010

CODE:

Im making basic application for the purpose of testing the object... Basically when i press the button it sends the info to a 2nd form... when i do the date of registration is set automatically. However the date displays correctly but not the time 12:00:00 no matter what...

View 2 Replies

Purpose Of GET SET Property Versus Just Declaring It As Normal?

May 23, 2012

I have been wondering for a while what the difference is between the following two:

Public Property ProgressMaxValue() As Integer
Get
Return maxval
End Get

[code]....

View 2 Replies

Unable To Understand Enumerator's Reset's Purpose?

Dec 30, 2009

if a call to For Each starts by calling the Enumerator's MoveNext, then Current, then MoveNext, then Current, and so on until MoveNext returns a False then it exits, am i right to say that the Reset is never called?initially i thought that Reset would be called when MoveNext returns False, i tried this (a msgbox would come if it was ever called but i got no msgbox at all)

[code]...

if that's the case, what exactly is the use of the reset in an ienumerator, and is it ok to leave it empty, as such

View 4 Replies

Using GroupBox For Purpose Of Grouping Radio Buttons

Sep 21, 2010

I am finding it is not possible to use GroupBox (for the purpose of grouping radio buttons) in a Windows Mobile Application. Is there an alternative to this so I can group radio buttons in a Windows Mobile App?

View 1 Replies

C# - What Is The Purpose Of Adding BindableAttribute On A Property Of A Custom Control

Jun 27, 2012

I have seen that BindableAttribute is used to decorate public properties in custom controls. MSDN briefly mentions that it provides the ability to control the binding direction and whether binding is supported at design time.

public class MyControl : Panel
{
[Bindable(BindableSupport.No, BindingDirection.OneWay)]
public string MyString { get; set; }

[code]....

1) I set BindableSupport to No, however I could still do this in markup (.aspx).What does BindableSupport affect then? Does it hide the property in the toolbox?

<cc:MyControl runat="server" MyString="something" />

2) How does one-way binding and two-way binding work in the context of custom controls and ASP.NET?

View 2 Replies

Database - Replacement For Ms Access Db For Multi-LAN User Purpose?

Apr 27, 2012

I have been using access for my applications from over 4 years now. I realize its time to move on now and i need suggestions for a new database. Here are my requirements :should be able to connect it with Vb.net windows form frontend GUI - all database functions such as add/delete/edit/update will be done through the vb.net front-end only.Should be able to place the db on LAN and each client on the LAN can then access the centrally stored db through their individual front-ends.At the most 5-6 users will be reading/writing to the database at the same time , so the database should not crash or slow down Since i come from MS access background, i would like something thats similar to it so that i can learn and adapt to it quickly.Not very important, but i think its worth mentioning. This db will be the main central db for my .net application.My .net application will also be interacting with quickbooks and magento via some apis but ultimately all this data will go to the central db. So just curious, will there be any compataibility issues with the database that you suggest Should handle about 10 tables and around 10k records in each table Should be secure - just that i should be able to lock it up or anyhow prevent it being accessed from anywhere else other than the vb.net front-end.

Lastly, I would prefer it to be free to use if possible but not essential. I realize there are some topics like mysql vs sqllite and on databases, but pls understand i need suggestions for one that will be apt for the purposes i have listed above.

Edit : Just curious - Would i pushing the limits if i still stick to access - i understand access won't be good for multi-user access but i guess 5 users is not much ?

View 3 Replies

Dynamic Draggable Labels On Chart For Notation Purpose

Jul 22, 2010

I am deveolping a charting program and have a need to have dynamic draggable labels on the chart for notation purposes. Everything works fine until I try to drag a label past the 32767 (16 bit limit).

Here is the code that I drag the label with:
If ISDRAGGING = True Then 'DRAGGING LABEL
If CURRENTLABEL.Tag = 2 Then
CURRENTLABEL.Left = 0
[Code] .....

I have tried to create a new label and override the Top value with a Long Value, but it still does not do the trick. Hhere is my attempt to overload the top value to an integer.

Public Overloads Property Top() As Long
Get
Return _Top
End Get
Set(ByVal value As Long)
[Code] .....

The charts are dynamically generated from a database and represent depths. Usually at least 10000 feet are plotted at 5 pixels per foot. So some labels will be created or dragged below this 32767 line regularly. Any way to be able to drag the labels past this limit, or possible another option to be able to view these long charts.

View 5 Replies

Give Meaningful Names To A C# And .NET Project In The Same Solution With The Same Purpose?

Jun 12, 2012

I have two projects that contain extension methods. One project is implemented using C# and the other is implemented using VB.NET as there are some things I can do in VB.NET that I can't in C# and I want to leverage those features in my extension methods. How can I name the projects to convey their meaning while at the same time differentiating that they are implemented in different languages?For the C# elitists:One of the features that VB.NET supports that C# doesn't:Doesn't C# Extension Methods allow passing parameters by reference?FYI: This doesn't work for reference types, which is what I'm interested in.

public static void LoadFromXml<T>(this T targetObject, string xml)
{
targetObject = _Serializer.DeserializeFromXML<T>(xml);
}

View 2 Replies

Purpose Of Using Shared Methods That Return An Instance Of A Class?

Oct 11, 2010

What is the purpose of using shared methods that return an instance of a class, as opposed to a constructor?

ie: in VB.net, the system.drawing.color class has shared method "FromArgb(int, int, int) as color". This is different from java's implementation which simply is a constructor that takes three ints. Why the decision to do one or the other?

View 1 Replies

Saving Value Of DataGridView Cell Before Editing For Undo Purpose

Sep 12, 2011

I am adding an undo feature for a DataGridView using the Command Design Pattern. To create the EditCommand, I have to know what was the previous value of the cell, so I can re-enter it in case the user hits undo. I'm doing it using the CellBeginEdit and CellEndEdit events. With the CellBeginEdit, I save the value of the cell in a private variable and at the CellEndEdit function, I use the saved value to create the EditCommand. It's working fine, but I wonder if there is a more saner way to do it. Maybe a event that holds together the previous and the new cell value. Bonus points if I could actually prevent the DataGridView from updating itself and let the EditCommand do it.

View 1 Replies

Using MSComm32.ocx Control For The Purpose Of Serial Port Communication?

Jun 16, 2010

In my application I am using MSComm32.ocx control for the purpose of serial port communication.
when i am using it I am getting a following error while writing data to the port.

"AxMSComm1.Output {"Exception from HRESULT: 0x800A018A (CTL_E_GETNOTSUPPORTED)"} Object "

I am writing the output to the port like below. AxMSComm1.Output ="Hello"

I mention the properties of the ocx control in the form load like below. AxMSComm1.CommPort = 1

AxMSComm1.Settings ="9600,N,8,1"
AxMSComm1.InputLen = 0
AxMSComm1.PortOpen =True

I searched for this error in the net.But I am not found any information for this issue.

can anybody explain why I am getting that error and how to resolve it???

View 5 Replies

VS 2008 Use Regular Expression To Count Occurrence Of Purpose

Dec 1, 2011

I need to count the number of:

[Code]...

Can Regular Expression be used of this purpose? It's okay if they're in separate function, but I need to somehow get the counts of each of the above.

View 1 Replies

Any Type Of Database That Could Serve Purpose Without Giving Sharing Violation Error?

Jan 25, 2012

My problem is I need to develop a sales application to be used on 5 computers. The database needs to stay on a main computer and other computers should connect with that over LAN.I donot want to use SQL Server as it is too complicated to give permissions, setting up firewalls etc. for the end user.Is that any type of database that could serve my purpose, without giving sharing violation error?

View 1 Replies







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