Handle Base 13 (or Generic Base N)?

Sep 6, 2010

I can quickly knock together soem code to xlate base 10 to/from bae 13, but I just wondered if something very easy already exists in VB.NET (or even somethign generic, with base N, but right now I am only looking at base 13)

View 1 Replies


ADVERTISEMENT

.net - Can A Generic Version Of A Derived Class Override A Base Method Using The Generic Type

Apr 13, 2012

Consider:

Public MustInherit Class Column
Public ReadOnly Property ReturnSomethingUseful() As Object
Get
'return something useful

[code]....

But this gives the following error:

Public Overrides Function ParseValue(sValue As String) As Boolean'
cannot override 'Public Overridable Function ParseValue(sValue As String) As Object'
because they differ by their return types.

I accept that you can't do this, but I'd like to be able to preserve the semantics of what I'm. trying to do, which is to have an untyped version that deals with Object, but a typed version in derived classes that knows about the specific type T.

View 2 Replies

The Input Is Not A Valid Base-64 String As It Contains A Non-base 64 Character, More Than Two Padding Characters

Jun 3, 2011

I am getting following error when I am trying to use Convert.FromBase64String "The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or a non-white space character among the padding characters."

Dim payloadBytes = Convert.FromBase64String(payloadBase64)

Basically when my facebook registration form [URL]mphone field has a dash in it and encoded string is posted to other page and I am trying to decode it there which creates this error. Basically I am trying to extract data from Facebook Signed Request.

View 3 Replies

Make Base Interface For Generic Classes?

May 25, 2010

I'm trying to create a base interface for a class of mine that uses generics. However, I cannot figure out how to declare a property of the interface when its type won't be defined until the class is initialized.

To clarify, consider List(of T), which according to msdn, implements IList (among other things). Note that IList is not the same as its generic counterpart IList(Of T). So that mean any List(of T) can be converted to IList, which simply returns an object for its items. That's what I want to do with MyClass(of T), be able to cast it as IMyClass regardless of what T is.

But when I try such as:

Interface IMyClass
Prop A as Object
Class MyClass(of T) Implements IMyClass
Prop A as T Implements IMyClass.A

I get a signature error for the last line, even though object is broader than T. What am I doing wrong, or how exactly did Microsoft manage to make List(of T) implement IList?

View 9 Replies

Base Form Handle Event - Array Of ChildForm

Jul 27, 2009

Base form baseForm generate an array of childForm (3 fo them). I have one event handler in baseForm which is called when user close each childForm. The problem is that this event handler is only called when the last childForm is closed. When other childForm is closed, the event handler doesn't do anything.

View 7 Replies

Convert Base 100 To Base 60?

Jul 22, 2009

Specifically I have fractal hour... in base 100... that does not reflect what the true minutes/seconds left that it represents

View 2 Replies

VB Allows The Type Parameters To Be Used As The Base Class For The Generic Type?

Mar 30, 2010

1) VB Allows non-type template parameters2) VB supports explicit specialization 3) VB allows the type parameters to be used as the base class for the generic type4) VB allows a generic type parameter itself to to be a generic 5) VB enforces that all codes are valid for all types of parametrs

View 1 Replies

Strongly-typed Generic Method Invokes Its Argument's Base Class Method Instead Of A Shadowed Method In T?

Oct 19, 2010

Consider a MyForm class that contains a shadowed implementation of Show(). It also contains a CreateForm() method, which accepts an instance of the form and calls the shadowed sub:

[Code]....

View 3 Replies

Change Base 1 Array To Base 0 Array

Jan 31, 2012

I'm retrieving data from Excel and would like to keep my arrays 0 based but Excel returns 1 base. Is there a fairly simple way to return change the array from 1 to 0 base? Or do I just need to create a loop? Here's an example code right here:

[Code]...

View 1 Replies

Error - Base Class 'System.Windows.Forms.Panel' Specified For Class 'MenuButton' Cannot Be Different From The Base Class 'System.Windows.Forms.UserControl'

Mar 12, 2010

When I do this

Public Class cInherits : Inherits Panel

I get this: Base class 'System.Windows.Forms.Panel' specified for class 'MenuButton' cannot be different from the base class 'System.Windows.Forms.UserControl' of one of its other partial types.

How do I inherit?

View 4 Replies

How To Get A Base-10 Log

Jun 22, 2010

In old QBasic I could use the LOG function to get the base-10 log of a number. So I would have something like this...

sglFormula = 150 - (LOG(intTemp + 10) * 30)

... the LOG function would give me the log base-10 of a variable (intTemp) plus 10.How do I do this in VB.NET. Do I have to create my own log function and, if so, what would it look like?

View 2 Replies

What Is The Base Class Of .NET?

Oct 19, 2009

What is the base class of .NET?

View 2 Replies

.net - Events In Base Classes?

May 19, 2009

i have a base class which declares the event StatusTextChanged. My child class, of course cannot directly raise this event.

[Code]...

View 5 Replies

.net - RemoveHandlers On The Base Form?

Feb 8, 2010

I wonder if I can remove all added event handlers in all the child forms from the one base form in the Closing method. (VB.NET; .NET 2.0)Background: In a project I analyze a memory problem. I verified with the memory profile (see related question) and find out that some forms are not collected by the GC, probably because of the EventHandler non-removed references.

In the project all the forms inherits from the BaseForm. Now I search I way to remove in the OnClosed method foreach Control all the EventHandlers to/from the ChildForms.

View 2 Replies

.net :: AddressOf In Base Class?

Mar 16, 2011

When referencing a method's address, should we take into account the overriding or not?

Class B
Inherits A
Overrides Sub Foo

[code].....

View 2 Replies

Anyone Used ConQAT With A Code Base

Feb 16, 2010

To quote from the ConQAT - Continuous Quality Assessment Toolkit website Long-lived software systems are subject to gradual quality decay if no counter measures are taken. Continuous quality control counters this decay through an orchestrated application of constructive and analytic quality assurance techniques. The Continuous Quality Assessment Toolkit ConQAT provides the tool-support required to enact continuous quality control in practice. It supports the rapid development of quality dashboards that integrate diverse quality analysis methods and tools.However before I spend lots of time looking at it, is it usefull for a VB.NET project?

View 1 Replies

C# - Extending The Base Class?

Mar 5, 2010

When you create a webpage in ASP.net, the codebase inherits System.Web.UI.Page Now when I extend the page object to check for SessionExpired for example, I create a new class and inherit from system.web.ui.page, and overwrite some functions. The problem then is that on each page, I have to replace system.web.ui.page with my custompage class. Is there a way to extend a class by adding methods or modifying its methods directly (e.g. add the sessionExpired check to System.Web.UI.Page) ?I'm using .NET 2.0

View 2 Replies

C# - Using Many Classes In GUI That Inherit From A Base?

Oct 20, 2010

I have classes setup similar to this:

<DataContract()> _
Public MustInherit Class SystemTaskProcessBase
Public MustOverride ReadOnly Property Name() As String
Public MustOverride ReadOnly Property Description() As String
Public MustOverride Property Result() As SystemTaskResult

[Code]...

I need to use these classes on the client system, but also need to be able to create these "tasks" through a management interface. Each class (Task) that inherits the base, could have its own properties that are unique to each class, but at the same time, share the same common base class properties. For example, the above shows a reboot task and a delete file task, the delete file task needs to know which file to delete, so has a property for that. But the reboot task does not need this property. So when the management application is creating these tasks, it shouldn't provide a text box for the file property for the reboot task. There may be more tasks created at a later date with completely different properties.

How would I go about providing the WinForms management application a way to enumerate each class into a ListView for example, and allowing the user to create these tasks and filling in the dynamic properties that each class would have? Desired functionality would be to create a task form that creates dynamic controls available for the properties as needed, depending on the public properties in each class, but at the same time have the base class properties available as well.

View 1 Replies

Calling Java Base API's?

Aug 9, 2011

know about below queries,

1) How to Call Java base API's Through VB.Net 3.5

2) Is it a feasible approach to call Java API's through VB.Net as these 2 are different platform?

View 2 Replies

Cannot Connect To Data Base

Dec 19, 2009

I am using following code before calling my mainform. This code is used to have a Login window before the main application starts.[code]....

View 1 Replies

Converting A Int To Base 2 String

Nov 16, 2009

There is a lot on the internet about converting a int to base 2 string, but I need to convert it back.
[code...]

View 4 Replies

Declare That The Input Is In A Certain Base?

Dec 11, 2011

I am working on an Electronics convertor to convert inputs between the bases. My question is whether or not their is a way to declare that the input is in a certain base and not the default base 10.

View 6 Replies

Different Versions Of Base Class

Sep 7, 2011

Any best practices on how to deal with different versions of base classes.We have made significant changes to the base class but still have lots of code inheriting from the old base class. Could you recommend how we introduce new base class.We'd like all new code to use the new base class. But, we would like the option to have old code still inherit from old base class so we have time to switch and test old classes with new base class.

View 11 Replies

Must Declare A 'Sub New' Because Its Base Class

Jul 17, 2010

I have a class library that have a lot of classes, in every class I have "Inherits LINQDataContext". And In my xx.designer.vb file I have...

Public Sub New()
MyBase.New(Global.My.MySettings.Default.DbConnectionString, mappingSource)
OnCreated()
End Sub

But I get a lot of "Class 'xxxxx' must declare a 'Sub New' because its base class 'LINQDataContext' has more than one accessible 'Sub New' that can be called with no arguments." errors

View 10 Replies

.net - How To Convert Me.Base To C# Imports Microsoft

Aug 17, 2011

Do not know how to convert Me.Base to C# Imports Microsoft.VisualBasic

[Code]...

View 3 Replies

.Net OOP Superclass Base.net And Constructor Parameters?

Mar 13, 2009

I have a base class that contains a fairly large number of parameters in it's New constructor. I have 7 subclasses that inherit the Super base class. My question/issue is, all of the subclasses use the same values for most of the parameters in the New constructor of the base class and these subclasses can be called one after the other. I would like to populate the common values for the superclass and then use those for each of the subclasses, but I can't come up with a good way to do this. If I could figure out how to do this, I wouldn't have to pass all of those parameters in the MyBase.New call for each subclass. I'll try to illustrate with some code .

[Code]...

View 3 Replies

Base Classes On Proxy Objects

Sep 25, 2011

I have a webservice that is wrapped up by a data access object and is accessed by many different UI controls.

The proxy objects look something like this:

Public Class WebProxyObject1
' Common properties, there are about 10 of these
Public Name As String

[Code]....

View 1 Replies

C# - Keyword 'this' Not Available Calling The Base Constructor?

Mar 15, 2010

In the inherited class I use the base constructor, but I can't use the class's members calling this base constructor. In this example I have a PicturedLabel that knows its own color and has an image. A TypedLabel : PictureLabel knows its type but uses the base color.

The (base) image that uses TypedLabel should be colored with the (base)color, however, I can't obtain this color

Error: Keyword 'this' is not available in the current context`

[Code]...

View 4 Replies

Call A Method From The Base Class?

Jan 3, 2011

REF: http:[url].....The above reference is where I got the code below.This code adds buttons to Form1. When a button is clicked a messagebox appears stating what button was clicked. I want to have the ClickHandler fill a RichTextBox on Form1 (I added a RTB to Form1). My problem is I can't do a Dim xForm As New Form1 to fill the RTB from the ButtonArray Class. I can place my file's text in a MessageBox so I know the code I added is correct. I also tried placing a Property method on Form1 and using a Accessor to fill the RTB, however it also requires Dim xForm As New Form1. How can I get my data from files to the RichTextBox on Form1 from the ClickHandler in the ButtonArray Class? See ButtonArray Class Below.

Imports System.IO

Imports System.Text

Imports System.Collections.CollectionBase[code].....

View 5 Replies

Cast Inherited To Base Class?

May 19, 2010

The program below trhows an error in the line "mTable2 = mTable.Copy". The error is: "Unable to cast object of type 'System.Data.DataTable' to type InherintanceQuestion.InheritedTable". This is because mTables is an instance of the InheritedTable class which inherits a DataTable and mTable is a DataTable. So, is there any way I can create the mTable2 to the mTable.copy to the mTable.

Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[code].....

View 2 Replies







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