I've inherited a codebase of C# dlls that are called via COM-interop (or so it has been described). The C# code also uses COM objects internally to perform the basic functionality of the parent application.
I'm refactoring some of the DRY violations out of the code because finding duplications in 100,000 lines of code across 50 or 60 d...
<cat number="35">
<eye>brown</eye>
<tail>long</tail>
</cat>
<dog number="35">
<eye>green</eye>
<tail>short</tail>
</dog>
I've loaded an XML like this into a dataset, and to access info i'm just using this:
ds.Tables(cat).Rows(0)(eye) //returns brown
but i'd like to get the cat's number, how do i access this information using one...
I have:
Page.aspx
Page.aspx.vb
TestClass.vb
I'm trying to access a shared property of the TestClass class from the Page.aspx.
This code works fine:
...
<head>
<script language="JavaScript">
<% if System.Globalization.CultureInfo.CurrentCulture.Name.ToLower = "pt-br" Then %>
alert('portugues');
<% else %>
ale...
If I have an informational property that provides an editor only, in the property inspector, is there an attribute I can tag the property with so that it won't be saved to the .Designer.cs file?
...
I am trying to register different converter instances in the faces-config, using a standard converter class to which different parameters are passed.
The code below registers two DateTimeConverters, the first one for dates including time and the second one for time only. But the pattern property never gets set. Can this be done?
<conve...
I am trying to create a Principal like this:
PrincipalContext pc = new PrincipalContext(ContextType.Machine);
GroupPrincipal group = new GroupPrincipal(pc);
group.Name = "Some Group Name";
group.Description = "Some Group Name Description";
group.Save();
However, when the code is executed, I get the following exception message:
...
Is there a standard XML format for property listings?
I've found a couple:
reaxml1 reaxml.realestate.com.au/docs/reaxml1-xml-format.html
RELML www.xml.com/98/08/real/relml-dtd.html
but which is best / most used? Has anyone created xml property listings using these?
...
Hello,
For some reason I need to save some big strings into user profiles. Because a property with type string has a limit to 400 caracters I decited to try with binary type (PropertyDataType.Binary) that allow a length of 7500. My ideea is to convert the string that I have into binary and save to property.
I create the property using t...
I have an Application Delegate class with a enumeration which looks like this:
typedef enum {
Online = 3500,
DoNotDisturb = 9500,
Offline = 18500,
Away = 15500,
Busy = 6500,
BeRightBack = 12500
} status;
Additionally I have a property to set a value from the enumerator in my interface file:
@interface MyAppDel...
Is there a way to change the property of an object in C# like this.
int Number = 1;
label[Number].Text = "Test";
And the result will change label1.Text to "Test";
Hope you understand what I mean.
...
Consider the following class definitions
class of2010(object):
def __init__(self):
self._a = 1
self._b = 2
self._c = 3
def set_a(self,value):
print('setting a...')
self._a = value
def set_b(self,value):
print('setting b...')
self._b = value
def set_c(self,value):
...
The output seems a bit fishy given the following code. Why is "get in Base" only printed once? And why is not "set in Base" printed at all? The actual getting/setting seems to work fine though. What am I missing?
class Base:
def __init__(self):
self.s = "BaseStr"
def getstr(self):
print "get in Base"
ret...
I am having a really odd problem trying to set a simple float value to 1.
My property:
{
float direction;
}
@property(nonatomic)float direction;
Which is synthesized:
@synthesize direction;
I then used the following code:
- (void)setDirection:(float)_direction {
NSLog(@"Setter called with value of %f",_direction);
self->d...
NHibernate question:
Say I have a SQL table Person and it has a Picture column ( OLE Object ) . I have a class Person and it has : byte[] Picture attribute.
Is it possible to map like this ?
<property name = "Picture" column = "Picture" type = "System.Byte[]" lazy="true" />
Does the "lazy" keyword have any effect on properties ...
I have a custom property on my Django model that returns the full name of a Person:
class Person(models.Model):
first_name = models.CharField(max_length=30)
last_name = models.CharField(max_length=30)
def _get_full_name(self):
return "%s %s" % (self.first_name, self.last_name)
full_name = property(_get_full_name)
When I create ...
Hi, I want to store network carrier as a string (e.g. AT&T) for each contact in address book.
I found a method
addPropertiesAndTypes for creating a custom property. But I am not able to find any proper example to do this.
I am using following code to iterate through contact book records:
ABAddressBookRef addressBook = ABAddressBookCr...
Hi,
Does someone knows C# best practice about the way to define attribute visibility (private or protected) behind public property in abstract class or parent class.
In other worlds what is the best practice by default (and why) between:
public abstract class MyClass
{
private string myAttribute;
public string MyAttribute
...
I'm new to C, new to objective C. For an iPhone subclass, Im declaring variables I want to be visible to all methods in a class into the @interface class definition eg
@interface myclass : UIImageView {
int aVar;
}
and then I declare it again as
@property int aVar;
And then later I
@synthesize aVar;
Can you help me understa...
Hello,
As a C++ programmer I've recently started to work with visual c++. I've get stuck with the properties.
The idea is to create an inner class that would have 2 methods plus property like get/set functions. Does it even possible in visual C++ (i guess yes).
The usage would be like this:
Foo ^ foo = gcnew Foo();
int a;
foo->Metho...
Hello ,
I am creating an object at server side of an aspx (test.cs) page from a class (asp.net 2.0 C#)
public partial class Vendor_VendorUsedTicketsPopup : System.Web.UI.Page
{
ReportInvoice _objReportInvoice = new ReportInvoice();
protected void Page_Load(object sender, EventArgs e)
{
_objReportInvoice.ReportId = ...