Enumerate Through A Set Of System Definitions?
Aug 6, 2010Does anyone know how to enumerate through the set of file attibutes that are part of Windows? How are Unions handled which have a sum of 28 in file attributes?
View 1 RepliesDoes anyone know how to enumerate through the set of file attibutes that are part of Windows? How are Unions handled which have a sum of 28 in file attributes?
View 1 RepliesI would like to populate a Combo with all the type names that a DataColumn can be ("System.String", "System.Boolean", etc). How can I do that without having to manually add the combo items?
View 4 Replieswhen building my application I am getting some temporary files shown in Solution Explorer under Miscellaneous Files lie App_Web_YDKG.VB with following code block in that generating error
Protected ReadOnly Property Profile() As System.Web.Profile.DefaultProfile
Get
Return CType(Me.Context.Profile,System.Web.Profile.DefaultProfile)
End Get
End Property
Error : Error 58'Protected ReadOnly Property Profile() As System.Web.Profile.DefaultProfile' has multiple definitions with identical signatures.C:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesinfinityvb2ae71c27d560144bApp_Web_pwduczex.38.vb456
I'm not positive I'm going about this the right way. I've got a suite of applications that have varying types of output (custom defined types).For example, I might have a type called Widget:
Class Widget
Public name as String
End Class
Throughout the course of operation, when a user experiences a certain condition, the application will take that output instance of widget that user received, serialize it, and log it to the database noting the name of the type.
Now, I have other applications that do something similar, but instead of dealing with Widget, it could be some totally random other type with different attributes, but again I serialize the instance, log it to the db, and note the name of the type. I have maybe a half dozen different types and don't anticipate too many additional ones in the future.
After all this is said and done, I have an admin interface that looks through these logs, and has the ability for the user to view the contents of this data thats been logged. The Admin app has a reference to all the types involved, and with some basic switch case logic hinged upon the name of the type, will cast it into their original types, and pass it on to some handlers that have basic display logic to spit the data back out in a readable format (one display handler for each type)NOW... all this is well and good...Until one day, my model changed. The Widget class now has deprecated the name attribute and added on a bunch of other attributes. I will of course get type mismatches in the admin side when I try to reconstitute this data.
I was wondering if there was some way, at runtime, i could perhaps reflect through my code and get a snapshot of the type definition at that precise moment, serialize it, and store it along with the data so that I could somehow use this to reconstitute it in the future?
Trying to use a call recording API using sockets. We have the API documentation but the samples are all in C++.How would I declare the following in VB.NET or C#?
[code]...
Note from the documentation: message identifiers are unsigned 32-bit values (ULONG).
I want to make fill my database with 2 fields.1) a specific word2) the definitiontherefore I am using a blank database program in Microsoft Office Access 2007...the blank database has 3 fieldsIdfield onefield twofield one will insert the wordfield two will insert the defintionmy question is this:does the database grow dynamically with the insert or do I have to specify how much memory?
View 2 RepliesIn VB 2010, you can use the implied properties like C# which turns this[code]...
What I want to do is replace the old style with the new style in a few file. Since Visual Studio's find and replace tool allows you to do regular expressions, I assume there must be an expression I can use to do this conversion.
[code] I dont really understand what the error-msg means. I've used this bit of code in many of my projects but this time I get this error: [code]
View 2 Repliesis it possible to collapse multiple definitions for organizational purposes.Here is an example, I have multiple Subs like below:
Private Sub B24B_Click ...
Private Sub B24H_Click ...
Private Sub B25M_Click ...
I want to be able to incorporate some constant definitions and enum types in multiple classes of mine.Something akin to including a header file in C++. How do I do this best in VB.NET? I'm having a hard time because the only way I can see to do it is to inherit a class with the definitions in it but there is no multiple inheritance in vb.net so I am having some issues with that.
View 6 RepliesI added a table to my program and it generated two errors and not it will not build. I have added quite a few tables and this has never happened before. The reeors are:
1. public sub new ' has multiple definitions with identical signatures
2. 'Protected Overrides Sub OnCreateMainForm()' has multiple definitions with identical signatures.
I have deleted the table that I added and tried undoing everything having to do with it but nothing works.
way that I can create a program that has the ability to check spelling that are being entered by a user or even displays a definition of a word? For example, when a user keys in a word in textbox then displays a definition into another tetbox but the main concern here is the source of the definition. Of course, it would be a very long task if i would manually encode words and their definitions in a database and retrieve them. I mean, can I just retrieve definition from a dictionary source, like maybe
View 1 RepliesI have been trying to use Subsonic 3 in a test application in order to understand how it works. However, when it builds the vb files from the database the files are full of '' has multiple definitions with identical signatures errors. I am using Visual Studio 2008 configured for VB.
View 1 Repliesi dont know what has happened to my project. it suddenly wont build and comes up with some errors regarding identical signatures. to the best of my knowledge i didnt do anything to it. i was testing some drawing stuff, but it now no longer builds on any of my back up copies either.the error list show errors at line 25 "public sub new() has multiple defs...." and line 34 "Protected overrides sub oncreatemainform() has multiple defs.
Code:
'------------------------------------------------------------------------------
' <auto-generated>
[code].....
Visual Basic gave me these errors:
Error1'Private Shared Sub AutoSaveSettings(sender As Object, e As System.EventArgs)' has multiple definitions with identical signatures.C:Documents and SettingsCatalinmy documentsvisual studio 2010ProjectsGame OS 0.2Game OS 0.2My
[code].....
I've created a class and put its objects into an Arraylist.
Here is the class:
Public Class ItemColl
Public TBPid, PAid As Integer
Public Sub New(ByVal _TBPid As Integer, ByVal _PAid As Integer)
[Code].....
I know I can override ToString(), but It would take a lot of time to change existing code with ".ToString()".
Aren't arrays of object enumerable?Look for the comments in the code
Public Class AddressCollection
Inherits System.Collections.ObjectModel.Collection(Of AddressType)
Public Sub New()
End Sub
[Code]...
I'm looking for some code (C# or VB.NET preferred) to iterate through all folders in an Outlook mailbox and return the names of those folders. I'm not looking to pop up the Outlook folder dialog, but rather to return the folder names in a given mailbox from outside Outlook.
View 2 RepliesI'm writing a little Database administration program.It works fine if you give the db, but not when you don't know which db is installed.How can I enumerate all running databases?
View 4 RepliesI want to enumerate all the directories in C: and also at the end of it I want the size. Now, I can enumerate the directories but I have no idea how to get the size.
I have the code here but everytime I try and add My.Computer.FileSystem.GetFileinfo it bombs out saying that I have not expressed it. I suppose I need to add a variable for my.computer.filesystem.getfileinfo but how do I add two variables in one for each statement.I guess I could declare it outside the "for each" statement.[code]...
What is the fastest way to enumerate the letters of the alphabet? Anything built into the framework?[code]...
View 3 RepliesI need to enumerate a list of OU (Active Directory) and output in treeview.
View 1 RepliesI wrote some code to add the Name and Value to Combobox.
dt = New DataTable
dt.Columns.Add("Name")
dt.Columns.Add("Value")
[Code]....
Now i want to enumerate all the ValueMemer (11,22,33,44) and all the DisplayMember (AA,BB,CC,DD) from Combobox1, how to do?
I think my problem is easy to solve. I developed an interface called "Animal". My programmers created classes for "Dog", "Cat", and "Horse" Later I want to let the user create an animal in a Windows form. How can I get my annimals to appear in the combo for selecting one of them? Each animal has it's own DLL. If tomorrow a new animal is developed, the combo should present the new value.
View 2 RepliesI want to create a form almost exactly like the database properties page that appears in SQL Server Management Studio when the properties of a SQL CE database is selected. Basically, the form has page options that show general properties in a propertygrid, a shrink and repair page option, and an option to set the password. Does Microsoft have some code posted on how they show the properties page of a sql ce database?
View 5 RepliesQuickest way to enumerate the alphabet in C#
Because I need to get all the characters of the alphabet OF AN ARBITRARY (variable) LANGUAGE, and that in the correct ordering sequence.
How can I do that without knowing the alphabet of every possible culture/language? System.Gobalization.Cultureinfo for example has information on date format, and a sorting method, and codepage info. But not info on the alphabet itselfs. Forthermore 'A' to 'Z' ordering iterating won't do, because German for example has characters such as ÄÖÜ, which are after 'Z' in the codepage numbering, but follow after aou when sorting.
Can I somehow use the codepages to get all the characters, and sort them somehow ? By 'all the characters' I mean all letters, including numbers, but not punctuation marks. And possibly only upper XOR lowercase.
I need to know how many times an Item is repeated in a listbox? I use Listbox1. items. contains(Any string) to determine if this item is existed or not , But I need to know how many times??
View 19 RepliesIm actually using this:
Dim oControl as Control
For Each oControl In Me.Controls
debug.print oControl.Name
Next
the thing its that i doesnt enumerate the child objects for example..
if the form has a tabcontrol, it will spit only Tabcontrol1 but i want to enumerate everything contained in all the form even of theyr childs of other objects.
faster way to enumerate through a directory and sub-folders to gather all the files in the enumeration? This is what I have right now:
Public Shared allFiles() As String
allFiles = Directory.GetFiles(<ServerLocation>, "*.*", SearchOption.AllDirectories)
EDIT: I am enumerating these files from a server location. I don't know if that will change the perspective of this question or not.
I have a class in vb.net, it looks like
public class myclass
Public Const AAA = 111
Public Const BBB = 222
Public Const CCC = 333
End Class
Now i want to get all the values (111,222,333) to an array list (or collection, or whatever) , how to do?